-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass: refactor extension packaging #39121
Conversation
cc maintainers: @lovek323 @the-kenny @fpletz @jwiegley |
@GrahamcOfBorg build pass pass-otp |
Success on aarch64-linux (full log) Attempted: pass, pass-otp Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: pass Partial log (click to expand)
|
@GrahamcOfBorg build passExtensions.import passExtensions.otp passExtensions.tomb passExtensions.update |
Success on aarch64-linux (full log) Attempted: passExtensions.import, passExtensions.otp, passExtensions.tomb, passExtensions.update Partial log (click to expand)
|
As the person who added the previous plugins, thank you for doing this properly. 👍 |
Success on x86_64-linux (full log) Attempted: pass, pass-otp Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: pass Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: passExtensions.import, passExtensions.otp, passExtensions.tomb, passExtensions.update Partial log (click to expand)
|
When I try to build this: (pass.withExtensions (ext: with ext; [ otp tomb import update ])) I get:
|
Ah, that would be the @Mic92 Any suggestions for an alternative name? |
@tadfisher pass-import? |
If switching |
71b7c20
to
0c2a7fa
Compare
@GrahamcOfBorg build pass pass-otp passExtensions.pass-import passExtensions.pass-otp passExtensions.pass-tomb passExtensions.pass-update |
Success on aarch64-linux (full log) Attempted: pass, pass-otp, passExtensions.pass-import, passExtensions.pass-otp, passExtensions.pass-tomb, passExtensions.pass-update Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: pass, pass-otp, passExtensions.pass-import, passExtensions.pass-otp, passExtensions.pass-tomb, passExtensions.pass-update Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: pass Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: pass Partial log (click to expand)
|
Thanks! |
Motivation for this change
It was pointed out in a
pass-otp
PR that thepass-otp
derivation doesn't actually work, because it's not included in thepass
environment. For context,pass
requires extension scripts to live in${pass}/lib/password-store/extensions
, and those scripts can have external dependencies of their own.I looked at adding
pass-otp
to the existingpass
derivation but it was looking a bit nasty to hack in there, as the derivation built a set of extensions unconditionally and included them in thepass
output.So I refactored the derivation to clean up some things:
pass-extensions-env
environment and link that output to${pass}/lib/password-store/extensions/
.extensions/*.nix
, which can include their own dependencies independently of the genericpass
derivation.pass.withExtensions
passthru function which buildspass
with a configurable extensions environment, as inpassExtensions
attribute to facilitate discovering extensions.pass-otp
attribute and thetombPluginSupport ? false
argument for backwards-compatibility.pass-import
, as it doesn't work currently without apython.withPackages
python environment.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)