blob: c2590ac00cf62f93c61f55db92dcf35c86ab79f5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{ lib
, stdenv
, fetchFromGitHub
, substituteAll
, python3
, ghostscript
, coreutils
, pdftk
, poppler_utils
}:
let
python-env = python3.withPackages (ps: with ps; [ tkinter ]);
in
stdenv.mkDerivation {
pname = "pdf-sign";
version = "unstable-2023-08-08";
src = fetchFromGitHub {
owner = "svenssonaxel";
repo = "pdf-sign";
rev = "98742c6b12ebe2ca3ba375c695f43b52fe38b362";
hash = "sha256-5GRk0T1iLqmvWI8zvZE3OWEHPS0/zN/Ie9brjZiFpqc=";
};
patches = [
(substituteAll {
src = ./use-nix-paths.patch;
gs = "${ghostscript}/bin/gs";
mv = "${coreutils}/bin/mv";
pdftk = "${pdftk}/bin/pdftk";
pdfinfo = "${poppler_utils}/bin/pdfinfo";
})
];
buildInputs = [ python-env ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp pdf-sign pdf-create-empty $out/bin
patchShebangs $out/bin
runHook postInstall
'';
meta = {
description = "A tool to visually sign PDF files";
homepage = "https://github.com/svenssonaxel/pdf-sign";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.unix;
};
}
|