Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchzip,
|
|
python3,
|
|
python3Packages,
|
|
makeBinaryWrapper,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "pdfid";
|
|
version = "0.2.10";
|
|
format = "other";
|
|
|
|
src = fetchzip {
|
|
url = "https://didierstevens.com/files/software/pdfid_v${
|
|
builtins.replaceStrings [ "." ] [ "_" ] version
|
|
}.zip";
|
|
hash = "sha256-GxQOwIwCVaKEruFO+kxXciOiFcXtBO0vvCwb6683lGU=";
|
|
stripRoot = false;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/{bin,share/pdfid}
|
|
cp -a * $out/share/pdfid/
|
|
makeWrapper ${lib.getExe python3} $out/bin/pdfid \
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
--add-flags "$out/share/pdfid/pdfid.py"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Scan a file to look for certain PDF keywords";
|
|
homepage = "https://blog.didierstevens.com/programs/pdf-tools/";
|
|
license = with licenses; [ free ];
|
|
mainProgram = "pdfid";
|
|
maintainers = with maintainers; [ d3vil0p3r ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|