aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/pgpid
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/pkgs/pgpid
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/pkgs/pgpid')
-rw-r--r--flakes/mypackages/pkgs/pgpid/default.nix33
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 }:
2stdenv.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}