nixpkgs/pkgs/development/libraries/libdeflate/default.nix

34 lines
823 B
Nix
Raw Normal View History

2021-03-16 13:09:39 +00:00
{ stdenv, lib, fetchFromGitHub, fixDarwinDylibNames }:
2018-12-25 14:04:13 +00:00
stdenv.mkDerivation rec {
pname = "libdeflate";
2020-11-11 13:11:35 +00:00
version = "1.7";
2018-12-25 14:04:13 +00:00
src = fetchFromGitHub {
owner = "ebiggers";
repo = "libdeflate";
rev = "v${version}";
2020-11-11 13:11:35 +00:00
sha256 = "1hnn1yd9s5h92xs72y73izak47kdz070kxkw3kyz2d3az6brfdgh";
2018-12-25 14:04:13 +00:00
};
postPatch = ''
2020-05-19 22:23:11 +00:00
substituteInPlace Makefile --replace /usr/local $out
2018-12-25 14:04:13 +00:00
'';
2021-03-16 13:09:39 +00:00
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
2018-12-25 14:04:13 +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";
2020-01-11 09:20:00 +00:00
platforms = platforms.unix;
2018-12-25 14:04:13 +00:00
maintainers = with maintainers; [ orivej ];
};
}