Merge pull request #287046 from TomaSajt/pdf-sign

pdf-sign: fix version name, simplify installPhase, move to pkgs/by-name
This commit is contained in:
Weijia Wang 2024-02-08 00:03:51 +01:00 committed by GitHub
commit b634097747
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 13 deletions

View File

@ -10,12 +10,12 @@
}:
let
python-env = python3.withPackages (ps: with ps; [ tkinter ]);
python = python3.withPackages (ps: with ps; [ tkinter ]);
binPath = lib.makeBinPath [ ghostscript pdftk poppler_utils ];
in
stdenv.mkDerivation {
pname = "pdf-sign";
version = "unstable-2023-08-08";
version = "0-unstable-2023-08-08";
src = fetchFromGitHub {
owner = "svenssonaxel";
@ -26,18 +26,14 @@ stdenv.mkDerivation {
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ python ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp pdf-sign pdf-create-empty $out
makeWrapper ${python-env}/bin/python $out/bin/pdf-sign \
--add-flags $out/pdf-sign \
--prefix PATH : ${binPath}
makeWrapper ${python-env}/bin/python $out/bin/pdf-create-empty \
--add-flags $out/pdf-create-empty \
--prefix PATH : ${binPath}
install -Dm755 pdf-sign pdf-create-empty -t $out/bin
wrapProgram $out/bin/pdf-sign --prefix PATH : ${binPath}
wrapProgram $out/bin/pdf-create-empty --prefix PATH : ${binPath}
runHook postInstall
'';

View File

@ -11966,8 +11966,6 @@ with pkgs;
pdf-quench = callPackage ../applications/misc/pdf-quench { };
pdf-sign = callPackage ../tools/graphics/pdf-sign { };
pdfarranger = callPackage ../applications/misc/pdfarranger { };
briss = callPackage ../tools/graphics/briss { };