Skip to content

p11-kit: fix static build#147171

Closed
SCOTT-HAMILTON wants to merge 3 commits intoNixOS:masterfrom
SCOTT-HAMILTON:p11-kit
Closed

p11-kit: fix static build#147171
SCOTT-HAMILTON wants to merge 3 commits intoNixOS:masterfrom
SCOTT-HAMILTON:p11-kit

Conversation

@SCOTT-HAMILTON
Copy link
Contributor

Motivation for this change

Part of a bigger project to build Qt 5 statically #136107.

Things done

Fixed build of pkgsStatic.p11-kit,
created mesonShlibsToStaticHook: a preconfigure setup hook that replaces all shared_library calls to static_library calls in meson.build files.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 23, 2021
@alyssais
Copy link
Member

Hi, thanks for breaking these out into smaller PRs.

My understanding is that it doesn't make sense to build p11-kit statically. Am I misunderstanding?

I've been working on a bunch of static stuff recently, with some overlap with your work. From what I've found, Meson projects that are explicitly calling shared_library are doing that for a reason (libglvnd is another example that doesn't make sense to build statically).

So unless there's something I'm missing, I think a better path forward would be to disable p11-kit support in packages that optionally use it. I have a patch to do this for gnutls I could submit.

@SCOTT-HAMILTON
Copy link
Contributor Author

OK, I didn't really ask myself this question so thanks for pointing it out.

@SCOTT-HAMILTON SCOTT-HAMILTON deleted the p11-kit branch November 23, 2021 20:28
@alyssais alyssais mentioned this pull request Nov 23, 2021
13 tasks
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/libudev-as-static-library/16272/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants