From 29e6e32ef9b075cbf1859daed38c7d17f98ecff0 Mon Sep 17 00:00:00 2001 From: LightDiscord Date: Tue, 10 Mar 2020 21:32:47 +0100 Subject: [PATCH] pdf-parser: init at 0.7.4 --- pkgs/tools/misc/pdf-parser/default.nix | 34 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/misc/pdf-parser/default.nix diff --git a/pkgs/tools/misc/pdf-parser/default.nix b/pkgs/tools/misc/pdf-parser/default.nix new file mode 100644 index 000000000000..3fee457f6f54 --- /dev/null +++ b/pkgs/tools/misc/pdf-parser/default.nix @@ -0,0 +1,34 @@ +{ stdenv, python3Packages, fetchzip }: + +python3Packages.buildPythonApplication { + pname = "pdf-parser"; + version = "0.7.4"; + + src = fetchzip { + url = "https://didierstevens.com/files/software/pdf-parser_V0_7_4.zip"; + sha256 = "1j39yww2yl4cav8xgd4zfl5jchbbkvffnrynkamkzvz9dd5np2mh"; + }; + + format = "other"; + + installPhase = '' + install -Dm555 pdf-parser.py $out/bin/pdf-parser.py + ''; + + preFixup = '' + substituteInPlace $out/bin/pdf-parser.py \ + --replace '/usr/bin/python' '${python3Packages.python}/bin/python' + ''; + + meta = with stdenv.lib; { + description = "Parse a PDF document"; + longDescription = '' + This tool will parse a PDF document to identify the fundamental elements used in the analyzed file. + It will not render a PDF document. + ''; + homepage = "https://blog.didierstevens.com/programs/pdf-tools/"; + license = licenses.publicDomain; + maintainers = [ maintainers.lightdiscord ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6416a8061190..176a9afaac8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26531,6 +26531,8 @@ in hashdeep = callPackage ../tools/security/hashdeep { }; + pdf-parser = callPackage ../tools/misc/pdf-parser {}; + fluxboxlauncher = callPackage ../applications/misc/fluxboxlauncher {}; btcdeb = callPackage ../applications/blockchains/btcdeb {};