@@ -0,0 +1,31 @@
1+{ stdenv, lib, fetchFromGitHub }:
2+
3+stdenv.mkDerivation rec {
4+ name = "libdeflate-${version}";
5+ version = "1.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "ebiggers";
9+ repo = "libdeflate";
10+ rev = "v${version}";
11+ sha256 = "1wqxwza6rwmhrsy9sw86pdcd0w742gbzsy9qxnq6kk59m6h1dbsb";
12+ };
13+
14+ postPatch = ''
15+ substituteInPlace Makefile --replace /usr $out
16+ '';
17+
18+ configurePhase = ''
19+ make programs/config.h
20+ '';
21+
22+ enableParallelBuilding = true;
23+
24+ meta = with lib; {
25+ description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
26+ license = licenses.mit;
27+ homepage = https://github.com/ebiggers/libdeflate;
28+ platforms = platforms.linux;
29+ maintainers = with maintainers; [ orivej ];
30+ };
31+}