From 7d49699b701a987c2f0dd9a9e7a0ce1022db3b13 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Fri, 1 Jun 2018 14:14:12 -0400 Subject: [PATCH] pass-import: export PREFIX, set PASSWORD_STORE_BIN --- pkgs/tools/security/pass/extensions/import.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/pass/extensions/import.nix b/pkgs/tools/security/pass/extensions/import.nix index 8ba4abc5e3db..9e69cf376210 100644 --- a/pkgs/tools/security/pass/extensions/import.nix +++ b/pkgs/tools/security/pass/extensions/import.nix @@ -18,13 +18,18 @@ in stdenv.mkDerivation rec { buildInputs = [ pythonEnv ]; + patchPhase = '' + sed -i -e 's|$0|${pass}/bin/pass|' import.bash + ''; + dontBuild = true; installFlags = [ "PREFIX=$(out)" ]; postFixup = '' wrapProgram $out/lib/password-store/extensions/import.bash \ - --prefix PATH : "${pythonEnv}/bin" + --prefix PATH : "${pythonEnv}/bin" \ + --run "export PREFIX" ''; meta = with stdenv.lib; {