2022-09-30 11:47:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libjpeg, zlib, cmake, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qpdf";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "11.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qpdf";
|
|
|
|
repo = "qpdf";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-QXRzvSMi6gKISJo44KIjTYENNqxh1yDhUUhEZa8uz6Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ zlib libjpeg ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
preConfigure = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs qtest/bin/qtest-driver
|
2022-09-30 11:47:45 +00: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"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
homepage = "https://qpdf.sourceforge.io/";
|
2020-04-24 23:36:52 +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 ];
|
|
|
|
platforms = platforms.all;
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/qpdf/qpdf/blob/v${version}/ChangeLog";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|