libdeflate: 1.8 -> 1.17

patch was included in 1.9
which also started exposing a libdeflate.pc
  which is wanted by KiCad

project switched to cmake in 1.15
This commit is contained in:
Evils 2023-02-13 16:34:48 +01:00
parent 545c7a31e5
commit 3cf92a8760

View file

@ -1,38 +1,28 @@
{ stdenv, lib, fetchpatch, fetchFromGitHub, fixDarwinDylibNames, pkgsStatic }: { lib
, stdenv
, fetchFromGitHub
, fixDarwinDylibNames
, pkgsStatic
, cmake
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libdeflate"; pname = "libdeflate";
version = "1.8"; version = "1.17";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ebiggers"; owner = "ebiggers";
repo = "libdeflate"; repo = "libdeflate";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-P7YbuhP2/zJCpE9dxZev1yy5oda8WKAHY84ZLTL8gVs="; sha256 = "sha256-tKs8feGbeodOID8FPIUc/1LfBz1p0oN1Jfkv2OnA2qc=";
}; };
patches = [ cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
(fetchpatch {
url = "https://github.com/ebiggers/libdeflate/commit/ee4d18872bfe09a32cfd031c716b9069a04a50a0.diff";
sha256 = "0d2lllg60zbbbch0w0qrcqijrgski8xlsy5llg3i684d66ci538a";
})
];
postPatch = '' nativeBuildInputs = [ cmake ]
substituteInPlace Makefile --replace /usr/local $out ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
'';
makeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "DISABLE_SHARED=1"];
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
configurePhase = ''
make programs/config.h
'';
enableParallelBuilding = true;
passthru.tests.static = pkgsStatic.libdeflate; passthru.tests.static = pkgsStatic.libdeflate;
meta = with lib; { meta = with lib; {
description = "Fast DEFLATE/zlib/gzip compressor and decompressor"; description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
license = licenses.mit; license = licenses.mit;