1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
6 outputs = [ "out" "lib" "dev" ];
8 src = fetchFromGitHub {
11 rev = "${pname}-${version}";
12 name = "${pname}-${version}-src";
13 sha256 = "0dr8n4j5nj2h9n208jns56wglw59gg4qm3s7c6y3hs75d0nnkhm4";
16 nativeBuildInputs = [ cmake ];
18 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ];
21 install -Dm444 -t $out/share/doc/zopfli ../README*
22 cp $src/src/zopfli/*.h $dev/include/
26 inherit (src.meta) homepage;
27 description = "Very good, but slow, deflate or zlib compression";
29 Zopfli Compression Algorithm is a compression library programmed
30 in C to perform very good, but slow, deflate or zlib compression.
32 This library can only compress, not decompress. Existing zlib or
33 deflate libraries can decompress the data.
35 platforms = platforms.unix;
36 license = licenses.asl20;
37 mainProgram = "zopfli";
38 maintainers = with maintainers; [ bobvanderlinden edef ];