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";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "11.1.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}";
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-m0yMOaWX9LqSCrUdx62zXZ73xXH/iW6x7bXkz1Fm8zA=";
|
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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://qpdf.sourceforge.net/";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|