bottom: add gpu recognition, new apple sdk, refactor (#360568)
[NixPkgs.git] / pkgs / by-name / pd / pdfid / package.nix
blob321f7ad9f076d10b4611e32a9e5fff91715fe748
2   lib,
3   fetchzip,
4   python3,
5   python3Packages,
6   makeBinaryWrapper,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "pdfid";
11   version = "0.2.8";
12   format = "other";
14   src = fetchzip {
15     url = "https://didierstevens.com/files/software/pdfid_v0_2_8.zip";
16     hash = "sha256-ZLyhBMF2KMX0c1oCvuSCjEjHTnm2gFhJtasaTD9Q1BI=";
17     stripRoot = false;
18   };
20   nativeBuildInputs = [
21     makeBinaryWrapper
22   ];
24   installPhase = ''
25     runHook preInstall
26     mkdir -p $out/{bin,share/pdfid}
27     cp -a * $out/share/pdfid/
28     makeBinaryWrapper ${lib.getExe python3} $out/bin/${meta.mainProgram} \
29       --add-flags "$out/share/pdfid/pdfid.py"
30     runHook postInstall
31   '';
33   meta = with lib; {
34     description = "Scan a file to look for certain PDF keywords";
35     homepage = "https://blog.didierstevens.com/programs/pdf-tools/";
36     license = with licenses; [ free ];
37     mainProgram = "pdfid";
38     maintainers = with maintainers; [ d3vil0p3r ];
39     platforms = platforms.unix;
40   };