Skip to content
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

pinentry-curses doesn't provide pinentry-curses in PATH, when installed with nix-env #95777

Closed
jumper149 opened this issue Aug 18, 2020 · 6 comments
Labels
0.kind: bug Something is broken

Comments

@jumper149
Copy link
Contributor

Describe the bug
After installing pinentry-curses with nix-env -iA nixpkgs.pinentry-curses the actual derivation that is installed is nixpkgs.pinentry.

To Reproduce

nix-env -iA pinentry-curses
ls -l ~/.nix-profile/bin/pinentry*

this will only list pinentry and not pinentry-curses.

Expected behavior
After nix-env -iA nixpkgs.pinentry-curses both pinentry and pinentry-curses are in path.

I'm not sure what the package pinentry should provide. Maybe everything from pinentry-curses, pinentry-gnome, ...?

Additional context
I noticed a problem when using gpg on the tty. It will try to use pinentry-curses, but won't find it and say something like: No pinentry

Metadata
nix-shell -p nix-info --run "nix-info -m":

 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.58, NixOS, 20.03.2806.cb1996818ed (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.6`
 - channels(root): `"nixos-20.03.2806.cb1996818ed"`
 - channels(jumper): `"nixpkgs-20.09pre239139.a19e16756b6"`
 - nixpkgs: `/home/jumper/.nix-defexpr/channels/nixpkgs`

Maintainer information (I hope I got this right ^^):

# a list of nixpkgs attributes affected by the problem
attribute:
pkgs.pinentry
pkgs.pinentry-curses
# a list of nixos modules affected by the problem
module:
@jumper149 jumper149 added the 0.kind: bug Something is broken label Aug 18, 2020
@jumper149
Copy link
Contributor Author

Regarding the troubles with gpg:

I fixed it (even when using the regular nixpkgs.pinentry) by pointing the gpg-agent to the executable:
https://github.com/jumper149/dotfiles/blob/5d37bbced96c3f67ad8eb0e72c3d8327228d728e/.gnupg/gpg-agent.conf#L3

You can add pinentry-program /home/username/.nix-profile/bin/pinentry to ~/.gnupg/gpg-agent.conf

@matthewbauer
Copy link
Member

matthewbauer commented Aug 19, 2020

This is from the way we use multiple outputs with pinentry. It's not a great situation IMO, but probably easier to just manually install the outputs here.

You can try adding meta.outputsToInstall = [ "out" ] ++ enabledFlavors to the derivation. If that fixes the issue, you open a PR.

@jonringer
Copy link
Contributor

you can take look at #92084 , the "pinentry flavors" make it awkward to do a switch on which one you configured.

but the pinentry-curses package does contain both versions of the executable, on unstable and release channels:

$ nix-build -A pinentry.curses
... 
/nix/store/dg815gv4rl62bc0b66ghvddp8vqxvn30-pinentry-1.1.0-curses
$ ls ./result-curses/bin/
pinentry  pinentry-curses

@doronbehar
Copy link
Contributor

The core issue IMO is: #65325 + NixOS/nix#3538 .

@flokli
Copy link
Contributor

flokli commented Nov 22, 2020

As explained by @doronbehar, the issue here is nix-env -iA not properly installing things from different outputs: NixOS/nix#3538

@flokli flokli closed this as completed Nov 22, 2020
@flokli
Copy link
Contributor

flokli commented Nov 22, 2020

I closed this one, as there's a more generic tracking bug in Nixpkgs at #65325, in addition to the upstream Nix bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

5 participants