2022-09-21 22:39:31 +01:00
|
|
|
{ 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
|
|
|
|
2020-09-11 10:57:51 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qpdf";
|
|
|
|
repo = "qpdf";
|
2022-09-21 22:39:31 +01:00
|
|
|
rev = "v${version}";
|
2023-05-27 19:38:58 +01:00
|
|
|
hash = "sha256-cG8TxgWXZGol7X2eRQNeknMo4L8PoWSMvxOsDVO/Rx4=";
|
2014-11-05 02:28:33 +00:00
|
|
|
};
|
|
|
|
|
2022-09-21 22:39:31 +01:00
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2014-11-05 02:28:33 +00:00
|
|
|
|
2017-11-11 09:24:48 +00:00
|
|
|
buildInputs = [ zlib libjpeg ];
|
2014-11-05 02:28:33 +00:00
|
|
|
|
2022-09-21 22:39:31 +01:00
|
|
|
preConfigure = ''
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs qtest/bin/qtest-driver
|
2022-09-21 22:39:31 +01:00
|
|
|
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;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-11-09 15:41:13 +00:00
|
|
|
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";
|
2017-11-11 09:24:48 +00:00
|
|
|
license = licenses.asl20; # as of 7.0.0, people may stay at artistic2
|
2015-05-14 18:09:10 +01:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2014-11-05 02:28:33 +00:00
|
|
|
platforms = platforms.all;
|
2022-11-09 15:41:13 +00:00
|
|
|
changelog = "https://github.com/qpdf/qpdf/blob/v${version}/ChangeLog";
|
2014-11-05 02:28:33 +00:00
|
|
|
};
|
|
|
|
}
|