2023-07-25 14:00:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2015-06-06 15:18:04 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "zopfli";
|
2020-01-17 22:29:26 +00:00
|
|
|
version = "1.0.3";
|
2020-01-18 13:48:40 +00:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
2015-06-06 15:18:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "zopfli";
|
2019-08-15 12:41:18 +00:00
|
|
|
rev = "${pname}-${version}";
|
|
|
|
name = "${pname}-${version}-src";
|
2020-01-17 22:29:26 +00:00
|
|
|
sha256 = "0dr8n4j5nj2h9n208jns56wglw59gg4qm3s7c6y3hs75d0nnkhm4";
|
2015-06-06 15:18:04 +00:00
|
|
|
};
|
|
|
|
|
2017-11-29 15:10:25 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2016-01-02 13:52:08 +00:00
|
|
|
|
2017-11-29 15:10:25 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ];
|
2016-01-02 13:54:23 +00:00
|
|
|
|
2020-01-17 22:29:26 +00:00
|
|
|
postInstall = ''
|
2017-11-29 15:10:25 +00:00
|
|
|
install -Dm444 -t $out/share/doc/zopfli ../README*
|
2020-05-07 17:49:54 +00:00
|
|
|
cp $src/src/zopfli/*.h $dev/include/
|
2015-06-06 15:18:04 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-01-02 13:52:08 +00: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 15:18:04 +00:00
|
|
|
|
2016-01-02 13:52:08 +00:00
|
|
|
This library can only compress, not decompress. Existing zlib or
|
|
|
|
deflate libraries can decompress the data.
|
|
|
|
'';
|
2017-11-29 15:10:25 +00:00
|
|
|
platforms = platforms.unix;
|
2016-01-02 13:52:08 +00:00
|
|
|
license = licenses.asl20;
|
2020-01-18 14:10:11 +00:00
|
|
|
maintainers = with maintainers; [ bobvanderlinden edef ];
|
2015-06-06 15:18:04 +00:00
|
|
|
};
|
|
|
|
}
|