From 69fd82a71974c3cd463b1d88288dacea22d3cbbf Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Wed, 11 Mar 2026 20:42:34 +0100 Subject: [PATCH] python3Packages.libagent: hardcode pinentry path gpgconf --list-components reports pinentry inside the gnupg store path, but we ship pinentry as a separate package. Patch get_pinentry_binary() to use pinentry-curses directly. --- pkgs/development/python-modules/libagent/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix index 3d3df80e545f..3da7e23c5057 100644 --- a/pkgs/development/python-modules/libagent/default.nix +++ b/pkgs/development/python-modules/libagent/default.nix @@ -9,6 +9,7 @@ docutils, ecdsa, gnupg, + pinentry-curses, semver, mnemonic, unidecode, @@ -35,11 +36,12 @@ buildPythonPackage (finalAttrs: { hash = "sha256-JFHBE2o5VSJaz5yeCiXmBchm4/1gA+dZ/PRt3+WENdA="; }; - # hardcode the path to gpgconf in the libagent library + # hardcode the path to gpgconf and pinentry in the libagent library postPatch = '' substituteInPlace libagent/gpg/keyring.py \ --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" \ - --replace "'gpg-connect-agent'" "'${gnupg}/bin/gpg-connect-agent'" + --replace "'gpg-connect-agent'" "'${gnupg}/bin/gpg-connect-agent'" \ + --replace "get_gnupg_components(sp=sp)['pinentry']" "'${(lib.getExe pinentry-curses)}'" ''; build-system = [ setuptools ];