nixpkgs/pkgs/development/libraries/qpdf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, libjpeg, zlib, cmake, perl }:
2014-11-05 02:28:33 +00:00
stdenv.mkDerivation rec {
2019-08-13 22:52:01 +01:00
pname = "qpdf";
2023-05-27 19:38:58 +01:00
version = "11.4.0";
2014-11-05 02:28:33 +00:00
src = fetchFromGitHub {
owner = "qpdf";
repo = "qpdf";
rev = "v${version}";
2023-05-27 19:38:58 +01:00
hash = "sha256-cG8TxgWXZGol7X2eRQNeknMo4L8PoWSMvxOsDVO/Rx4=";
2014-11-05 02:28:33 +00:00
};
nativeBuildInputs = [ cmake perl ];
2014-11-05 02:28:33 +00:00
buildInputs = [ zlib libjpeg ];
2014-11-05 02:28:33 +00:00
preConfigure = ''
patchShebangs qtest/bin/qtest-driver
patchShebangs run-qtest
# qtest needs to know where the source code is
substituteInPlace CMakeLists.txt --replace "run-qtest" "run-qtest --top $src --code $src --bin $out"
2014-11-05 02:28:33 +00:00
'';
doCheck = true;
meta = with lib; {
homepage = "https://qpdf.sourceforge.io/";
2014-11-05 02:28:33 +00:00
description = "A C++ library and set of programs that inspect and manipulate the structure of PDF files";
license = licenses.asl20; # as of 7.0.0, people may stay at artistic2
maintainers = with maintainers; [ abbradar ];
2014-11-05 02:28:33 +00:00
platforms = platforms.all;
changelog = "https://github.com/qpdf/qpdf/blob/v${version}/ChangeLog";
2014-11-05 02:28:33 +00:00
};
}