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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

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