2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2015-06-06 17:18:04 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "zopfli";
|
2020-01-17 23:29:26 +01:00
|
|
|
version = "1.0.3";
|
2020-01-18 14:48:40 +01:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
2015-06-06 17:18:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "zopfli";
|
2019-08-15 14:41:18 +02:00
|
|
|
rev = "${pname}-${version}";
|
|
|
|
name = "${pname}-${version}-src";
|
2020-01-17 23:29:26 +01:00
|
|
|
sha256 = "0dr8n4j5nj2h9n208jns56wglw59gg4qm3s7c6y3hs75d0nnkhm4";
|
2015-06-06 17:18:04 +02:00
|
|
|
};
|
|
|
|
|
2017-11-29 16:10:25 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2016-01-02 14:52:08 +01:00
|
|
|
|
2017-11-29 16:10:25 +01:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ];
|
2016-01-02 14:54:23 +01:00
|
|
|
|
2020-01-17 23:29:26 +01:00
|
|
|
postInstall = ''
|
2017-11-29 16:10:25 +01:00
|
|
|
install -Dm444 -t $out/share/doc/zopfli ../README*
|
2020-05-07 19:49:54 +02:00
|
|
|
cp $src/src/zopfli/*.h $dev/include/
|
2015-06-06 17:18:04 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-01-02 14:52:08 +01:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Very good, but slow, deflate or zlib compression";
|
|
|
|
longDescription = ''
|
|
|
|
Zopfli Compression Algorithm is a compression library programmed
|
|
|
|
in C to perform very good, but slow, deflate or zlib compression.
|
2015-06-06 17:18:04 +02:00
|
|
|
|
2016-01-02 14:52:08 +01:00
|
|
|
This library can only compress, not decompress. Existing zlib or
|
|
|
|
deflate libraries can decompress the data.
|
|
|
|
'';
|
2017-11-29 16:10:25 +01:00
|
|
|
platforms = platforms.unix;
|
2016-01-02 14:52:08 +01:00
|
|
|
license = licenses.asl20;
|
2020-01-18 15:10:11 +01:00
|
|
|
maintainers = with maintainers; [ bobvanderlinden edef ];
|
2015-06-06 17:18:04 +02:00
|
|
|
};
|
|
|
|
}
|