diff options
Diffstat (limited to 'flakes/mypackages/pkgs/pgpid')
-rw-r--r-- | flakes/mypackages/pkgs/pgpid/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/pgpid/default.nix b/flakes/mypackages/pkgs/pgpid/default.nix new file mode 100644 index 0000000..a1fb9c2 --- /dev/null +++ b/flakes/mypackages/pkgs/pgpid/default.nix | |||
@@ -0,0 +1,33 @@ | |||
1 | { lib, stdenv, fetchFromGitHub, makeWrapper, bashInteractive, bash-libs, coreutils, file, gnugrep, texlive, pandoc, aspell, util-linux, findutils, gnused, gnupg, gawk, facedetect, graphicsmagick, qrencode, tesseract4, zbar, cups, vim }: | ||
2 | stdenv.mkDerivation { | ||
3 | pname = "pgpid"; | ||
4 | version = "master"; | ||
5 | src = fetchFromGitHub { | ||
6 | owner = "foopgp"; | ||
7 | repo = "pgpid"; | ||
8 | rev = "26c2137951775652e9e774977639ecaea5845cf7"; | ||
9 | sha256 = "sha256-noXDYWWxUryFnV99pyl0eV7hJLUkSy97Vqylx5dKN9g="; | ||
10 | }; | ||
11 | |||
12 | buildInputs = [ makeWrapper ]; | ||
13 | phases = [ "installPhase" ]; | ||
14 | installPhase = '' | ||
15 | mkdir -p $out/bin $out/share/pgpid $out/share/doc/pgpid | ||
16 | |||
17 | cp $src/pgpid-gen $src/pgpid-qrscan $out/bin | ||
18 | cp -r $src/doc $out/share/doc/pgpid | ||
19 | cp -r $src/data $out/share/pgpid | ||
20 | cp -r $src/imgsamples $out/share/pgpid | ||
21 | for i in $out/bin/*; do | ||
22 | patchShebangs $i | ||
23 | sed -i -e "/^TESSDATADIR/d" -e "/^GEOLIST_CENTROID/d" $i | ||
24 | sed -i -e 's@"$(dirname "$BASH_SOURCE")"@${bash-libs}/share/bash-libs/include@' $i | ||
25 | wrapProgram $i --set PATH ${lib.makeBinPath [ | ||
26 | facedetect graphicsmagick qrencode tesseract4 zbar cups gnugrep vim gnupg findutils | ||
27 | pandoc (texlive.combine { scheme-small = texlive.scheme-small; pdfcrop = texlive.pdfcrop; }) | ||
28 | ]}:$(cat ${bash-libs}/nix-support/propagated-build-inputs) \ | ||
29 | --set TESSDATADIR $out/share/pgpid/data \ | ||
30 | --set GEOLIST_CENTROID $out/share/pgpid/data/geolist_centroid.txt | ||
31 | done | ||
32 | ''; | ||
33 | } | ||