Merge #307371: miniz 2.2.0 → 3.0.2

This commit is contained in:
nicoo 2024-04-29 15:23:39 +00:00 committed by GitHub
commit aa30bcc07b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,29 +1,41 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib
, fetchFromGitHub
, nix-update-script
, stdenv
, testers
, validatePkgConfig
, cmake
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "miniz";
version = "2.2.0";
version = "3.0.2";
src = fetchFromGitHub {
owner = "richgel999";
repo = pname;
rev = version;
sha256 = "sha256-7hc/yNJh4sD5zGQLeHjowbUtV/1mUDQre1tp9yKMSSY=";
repo = "miniz";
rev = finalAttrs.version;
hash = "sha256-3J0bkr2Yk+MJXilUqOCHsWzuykySv5B1nepmucvA4hg=";
};
passthru.updateScript = nix-update-script {};
nativeBuildInputs = [ cmake ];
strictDeps = true;
nativeBuildInputs = [ cmake validatePkgConfig ];
postFixup = ''
substituteInPlace "$out"/share/pkgconfig/miniz.pc \
--replace '=''${prefix}//' '=/' \
--replace '=''${exec_prefix}//' '=/'
substituteInPlace "$out"/lib/pkgconfig/miniz.pc \
--replace-fail '=''${prefix}//' '=/' \
--replace-fail '=''${exec_prefix}//' '=/'
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Single C source file zlib-replacement library";
homepage = "https://github.com/richgel999/miniz";
license = licenses.mit;
maintainers = with maintainers; [ astro ];
platforms = platforms.unix;
pkgConfigModules = [ "miniz" ];
};
}
})