diff --git a/pkgs/tools/security/pass/extensions/import.nix b/pkgs/tools/security/pass/extensions/import.nix index 655bee41ba6e..7fa9ce3177e5 100644 --- a/pkgs/tools/security/pass/extensions/import.nix +++ b/pkgs/tools/security/pass/extensions/import.nix @@ -4,6 +4,7 @@ , python3Packages , gnupg , pass +, makeWrapper }: python3Packages.buildPythonApplication rec { @@ -55,6 +56,16 @@ python3Packages.buildPythonApplication rec { $out/bin/pimport --list-exporters --list-importers ''; + postInstall = '' + mkdir -p $out/lib/password-store/extensions + cp ${src}/scripts/import.bash $out/lib/password-store/extensions/import.bash + wrapProgram $out/lib/password-store/extensions/import.bash \ + --prefix PATH : "${python3Packages.python.withPackages(_: propagatedBuildInputs)}/bin" \ + --prefix PYTHONPATH : "$out/${python3Packages.python.sitePackages}" \ + --run "export PREFIX" + cp -r ${src}/share $out/ + ''; + meta = with lib; { description = "Pass extension for importing data from existing password managers"; homepage = "https://github.com/roddhjav/pass-import";