about summary refs log tree commit diff
path: root/pkgs/development/libraries/qpdf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/qpdf/default.nix')
-rw-r--r--pkgs/development/libraries/qpdf/default.nix36
1 files changed, 26 insertions, 10 deletions
diff --git a/pkgs/development/libraries/qpdf/default.nix b/pkgs/development/libraries/qpdf/default.nix
index e3772dbb27870..4a9e520f2a979 100644
--- a/pkgs/development/libraries/qpdf/default.nix
+++ b/pkgs/development/libraries/qpdf/default.nix
@@ -11,23 +11,36 @@
 , pdfmixtool
 , pdfslicer
 , python3
+, testers
+, versionCheckHook
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "qpdf";
-  version = "11.9.0";
+  version = "11.9.1";
 
   src = fetchFromGitHub {
     owner = "qpdf";
     repo = "qpdf";
-    rev = "v${version}";
-    hash = "sha256-HD7+2TBDLBIt+VaPO5WgnDjNZOj8naltFmYdYzOIn+4=";
+    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
@@ -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
@@ -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" ];
   };
-}
+})