Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qpdf: split outputs; modernize #326390

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions pkgs/development/libraries/qpdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,36 @@
, pdfmixtool
, pdfslicer
, python3
, testers
, versionCheckHook
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "qpdf";
version = "11.9.1";

src = fetchFromGitHub {
owner = "qpdf";
repo = "qpdf";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-DhrOKjUPgNo61db8av0OTfM8mCNebQocQWtTWdt002s=";
};

outputs = [
"bin"
"doc"
"lib"
"man"
"out"
];

nativeBuildInputs = [ cmake perl ];

buildInputs = [ zlib libjpeg ];

nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;

preConfigure = ''
patchShebangs qtest/bin/qtest-driver
patchShebangs run-qtest
Expand All @@ -38,6 +51,7 @@ stdenv.mkDerivation rec {
doCheck = true;

passthru.tests = {
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
inherit (python3.pkgs) pikepdf;
inherit
cups-filters
Expand All @@ -46,12 +60,14 @@ stdenv.mkDerivation rec {
;
};

meta = with lib; {
meta = {
homepage = "https://qpdf.sourceforge.io/";
description = "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;
changelog = "https://github.com/qpdf/qpdf/blob/v${version}/ChangeLog";
license = lib.licenses.asl20; # as of 7.0.0, people may stay at artistic2
maintainers = with lib.maintainers; [ abbradar ];
mainProgram = "qpdf";
platforms = lib.platforms.all;
changelog = "https://github.com/qpdf/qpdf/blob/v${finalAttrs.version}/ChangeLog";
pkgConfigModules = [ "libqpdf" ];
};
}
})