1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 09:02:46 +00:00

passExtensions.pass-import: install extension script and completion

The changes added in 40b9f4e meant that running the extension
from within pass, i.e. running `pass import` no longer worked because
the extension script didn't get installed and the completion scripts
for pimport don't get installed. This commit fixes that by manually
copying and wrapping the extension script and completion scripts
This commit is contained in:
Henry Mortimer 2021-04-15 01:41:17 +01:00
parent fb19505c01
commit ec4dc7e346
No known key found for this signature in database
GPG key ID: 7DEC56A97BCFCDFE

View file

@ -4,6 +4,7 @@
, python3Packages
, gnupg
, pass
, makeWrapper
}:
python3Packages.buildPythonApplication rec {
@ -50,6 +51,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";