nixpkgs/pkgs/tools/compression/zopfli/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
2015-06-06 17:18:04 +02:00
stdenv.mkDerivation rec {
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";
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 ];
2017-11-29 16:10:25 +01:00
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ];
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
'';
meta = with lib; {
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
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;
license = licenses.asl20;
2020-01-18 15:10:11 +01:00
maintainers = with maintainers; [ bobvanderlinden edef ];
2015-06-06 17:18:04 +02:00
};
}