about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libdeflate
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-26 16:20:28 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-26 16:20:28 +0100
commit647438344bfc1f77791391e2b4f98eef865c63dc (patch)
treeef580867fc6cc413940e4330d939cf1afda082cb /nixpkgs/pkgs/development/libraries/libdeflate
parentb084c6a0fab7f32c904c5c8e8db8dddcefbe507f (diff)
parente3474e1d1e53b70e2b2af73ea26d6340e82f6b8b (diff)
downloadnixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.gz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.bz2
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.lz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.xz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.zst
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.zip
Merge commit 'e3474e1d1e53'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libdeflate')
-rw-r--r--nixpkgs/pkgs/development/libraries/libdeflate/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libdeflate/default.nix b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
index 3bbf449d89aa..7aa0cef5a81d 100644
--- a/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
@@ -4,15 +4,17 @@
 , fixDarwinDylibNames
 , pkgsStatic
 , cmake
+, testers
 }:
-stdenv.mkDerivation rec {
+
+stdenv.mkDerivation (finalAttrs: {
   pname = "libdeflate";
   version = "1.19";
 
   src = fetchFromGitHub {
     owner = "ebiggers";
     repo = "libdeflate";
-    rev = "v${version}";
+    rev = "v${finalAttrs.version}";
     sha256 = "sha256-HgZ2an1PCPhiLsd3ZA7tgZ1wVTOdHzDr8FHrqJhEbQw=";
   };
 
@@ -21,14 +23,20 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ]
     ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
-  passthru.tests.static = pkgsStatic.libdeflate;
+  passthru.tests = {
+    static = pkgsStatic.libdeflate;
+    pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+    };
+  };
 
   meta = with lib; {
     description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
     license = licenses.mit;
     homepage = "https://github.com/ebiggers/libdeflate";
-    changelog = "https://github.com/ebiggers/libdeflate/blob/v${version}/NEWS.md";
+    changelog = "https://github.com/ebiggers/libdeflate/blob/v${finalAttrs.version}/NEWS.md";
     platforms = platforms.unix;
     maintainers = with maintainers; [ orivej kaction ];
+    pkgConfigModules = [ "libdeflate" ];
   };
-}
+})