pwgen_secure: fix missing words.txt (#161585)
* pwgen_secure: fix missing words.txt
This commit is contained in:
parent
33984cd89c
commit
dcd54b9c13
|
@ -1,7 +1,9 @@
|
||||||
{ lib, python3Packages, fetchFromGitHub }:
|
{ lib, python3Packages, fetchFromGitHub }:
|
||||||
|
|
||||||
with python3Packages;
|
let
|
||||||
|
inherit (python3Packages) buildPythonApplication pythonOlder;
|
||||||
|
|
||||||
|
in
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "pwgen-secure";
|
pname = "pwgen-secure";
|
||||||
version = "0.9.1";
|
version = "0.9.1";
|
||||||
|
@ -18,10 +20,18 @@ buildPythonApplication rec {
|
||||||
sha256 = "15md5606hzy1xfhj2lxmc0nvynyrcs4vxa5jdi34kfm31rdklj28";
|
sha256 = "15md5606hzy1xfhj2lxmc0nvynyrcs4vxa5jdi34kfm31rdklj28";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ docopt ];
|
postPatch = ''
|
||||||
|
shareDir=$out/share/${pname}
|
||||||
|
|
||||||
|
substituteInPlace pwgen_secure/rpg.py \
|
||||||
|
--replace "os.path.join(path, 'words.txt')" "os.path.join('$shareDir', 'words.txt')"
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [ docopt ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm755 spwgen.py $out/bin/spwgen
|
install -Dm555 spwgen.py $out/bin/spwgen
|
||||||
|
install -Dm444 pwgen_secure/words.txt -t $shareDir
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# there are no checks
|
# there are no checks
|
||||||
|
@ -32,5 +42,6 @@ buildPythonApplication rec {
|
||||||
homepage = "https://github.com/mjmunger/pwgen_secure/";
|
homepage = "https://github.com/mjmunger/pwgen_secure/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ peterhoeg ];
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
|
mainProgram = "spwgen";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue