diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/graphics/pdfredacttools | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/graphics/pdfredacttools')
-rw-r--r-- | nixpkgs/pkgs/tools/graphics/pdfredacttools/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/graphics/pdfredacttools/default.nix b/nixpkgs/pkgs/tools/graphics/pdfredacttools/default.nix new file mode 100644 index 000000000000..28b13c782b91 --- /dev/null +++ b/nixpkgs/pkgs/tools/graphics/pdfredacttools/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, python2Packages, imagemagick, exiftool, file, ghostscript }: + +python2Packages.buildPythonApplication rec { + pname = "pdf-redact-tools"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "firstlookmedia"; + repo = pname; + rev = "v${version}"; + sha256 = "01vs1bc0pfgk6x2m36vwra605fg59yc31d0hl9jmj86n8q6wwvss"; + }; + + patchPhase = ''substituteInPlace pdf-redact-tools \ + --replace \'convert\' \'${imagemagick}/bin/convert\' \ + --replace \'exiftool\' \'${exiftool}/bin/exiftool\' \ + --replace \'file\' \'${file}/bin/file\' + ''; + + propagatedBuildInputs = [ imagemagick exiftool ghostscript ]; + + meta = with stdenv.lib; { + description = "Redact and strip metadata from documents before publishing"; + longDescription = '' + PDF Redact Tools helps with securely redacting and stripping metadata + from documents before publishing. Note that this is not a security tool. + It uses ImageMagick to parse PDFs. While ImageMagick is a versatile tool, it has + a history of several security bugs. A malicious PDF could exploit a bug in + ImageMagick to take over your computer. If you're working with potentially + malicious PDFs, it's safest to run them through PDF Redact Tools in an isolated + environment, such as a virtual machine, or by using a tool such as the Qubes + PDF Converter instead. + ''; + platforms = platforms.all; + license = licenses.gpl3; + maintainers = with maintainers; [ leenaars ]; + }; +} |