2021-03-16 14:09:39 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fixDarwinDylibNames }:
|
2018-12-25 15:04:13 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libdeflate";
|
2021-08-14 13:38:54 +02:00
|
|
|
version = "1.8";
|
2018-12-25 15:04:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebiggers";
|
|
|
|
repo = "libdeflate";
|
|
|
|
rev = "v${version}";
|
2021-08-14 13:38:54 +02:00
|
|
|
sha256 = "sha256-P7YbuhP2/zJCpE9dxZev1yy5oda8WKAHY84ZLTL8gVs=";
|
2018-12-25 15:04:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-05-20 00:23:11 +02:00
|
|
|
substituteInPlace Makefile --replace /usr/local $out
|
2018-12-25 15:04:13 +01:00
|
|
|
'';
|
|
|
|
|
2021-03-16 14:09:39 +01:00
|
|
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
|
2018-12-25 15:04:13 +01:00
|
|
|
configurePhase = ''
|
|
|
|
make programs/config.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
|
|
|
|
license = licenses.mit;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ebiggers/libdeflate";
|
2020-01-11 10:20:00 +01:00
|
|
|
platforms = platforms.unix;
|
2018-12-25 15:04:13 +01:00
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|