2021-03-19 17:17:44 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fixDarwinDylibNames }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libdeflate";
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "1.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebiggers";
|
|
|
|
repo = "libdeflate";
|
|
|
|
rev = "v${version}";
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "1hnn1yd9s5h92xs72y73izak47kdz070kxkw3kyz2d3az6brfdgh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-05-29 06:06:01 +00:00
|
|
|
substituteInPlace Makefile --replace /usr/local $out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePhase = ''
|
|
|
|
make programs/config.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/ebiggers/libdeflate";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|