From a6e35308725518dbf4895f5a0c2fd1b8dfa003d0 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Thu, 2 Mar 2023 09:49:09 -0800 Subject: [PATCH 1/2] libagent: hardcode the path to gpgconf --- pkgs/development/python-modules/libagent/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix index 3bb8962e5a3a..43c1265eaab4 100644 --- a/pkgs/development/python-modules/libagent/default.nix +++ b/pkgs/development/python-modules/libagent/default.nix @@ -5,6 +5,7 @@ , cryptography , ed25519 , ecdsa +, gnupg , semver , mnemonic , unidecode @@ -30,6 +31,12 @@ buildPythonPackage rec { sha256 = "sha256-RISAy0efdatr9u4CWNRGnlffkC8ksw1NyRpJWKwqz+s="; }; + # hardcode the path to gpgconf in the libagent library + postPatch = '' + substituteInPlace libagent/gpg/keyring.py \ + --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" + ''; + propagatedBuildInputs = [ unidecode backports-shutil-which From 9d083587eed1df5faaff320807e9ec9d0e0ad231 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Thu, 2 Mar 2023 10:59:14 -0800 Subject: [PATCH 2/2] libagent: hardcode the path gpg-connect-agent --- pkgs/development/python-modules/libagent/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix index 43c1265eaab4..8a4a5a6a2d49 100644 --- a/pkgs/development/python-modules/libagent/default.nix +++ b/pkgs/development/python-modules/libagent/default.nix @@ -34,7 +34,8 @@ buildPythonPackage rec { # hardcode the path to gpgconf in the libagent library postPatch = '' substituteInPlace libagent/gpg/keyring.py \ - --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" + --replace "util.which('gpgconf')" "'${gnupg}/bin/gpgconf'" \ + --replace "'gpg-connect-agent'" "'${gnupg}/bin/gpg-connect-agent'" ''; propagatedBuildInputs = [