diff options
author | Kosta Welke <kw@trinatives.com> | 2017-11-29 16:10:25 +0100 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-11-29 18:34:09 +0000 |
commit | bfd4eae7a2da7f1d06f5152a22cd127a6b842899 (patch) | |
tree | 298a8cbe5fa947bc598d776c103c44fbe0e25b5d /pkgs/tools/compression/zopfli | |
parent | 2dfbc5f8ed5b2ad6e6d46e66af15d89a2cb8a7df (diff) |
zopfli: build on macos
Diffstat (limited to 'pkgs/tools/compression/zopfli')
-rw-r--r-- | pkgs/tools/compression/zopfli/default.nix | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/pkgs/tools/compression/zopfli/default.nix b/pkgs/tools/compression/zopfli/default.nix index 07e2eb194695..cc4edf64c4fe 100644 --- a/pkgs/tools/compression/zopfli/default.nix +++ b/pkgs/tools/compression/zopfli/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch }: +{ stdenv, fetchFromGitHub, fetchpatch, cmake }: stdenv.mkDerivation rec { name = "zopfli-${version}"; @@ -23,27 +23,26 @@ stdenv.mkDerivation rec { name = "zopfli-bug-and-typo-fixes.patch"; url = "https://github.com/google/zopfli/commit/7190e08ecac2446c7c9157cfbdb7157b18912a92.patch"; }) + (fetchpatch { + name = "zopfli-cmake.patch"; + url = "https://github.com/google/zopfli/commit/7554e4d34e7000b0595aa606e7d72357cf46ba86.patch"; + sha256 = "1pvfhir2083v1l042a4dy5byqdmad7sxnd4jrprl2hzzb2avxbbn"; + }) ]; - enableParallelBuilding = false; # problems, easily reproducible - buildFlags = [ - "zopfli" - "libzopfli" - "zopflipng" - "libzopflipng" - ]; + nativeBuildInputs = [ cmake ]; - installPhase = '' - mkdir -p $out/bin - install -m755 zopfli{,png} $out/bin + cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ]; - mkdir -p $out/lib - install -m755 libzopfli{,png}.so* $out/lib - - mkdir -p $out/share/doc/zopfli - install -m644 README* $out/share/doc/zopfli + installPhase = '' + install -D -t $out/bin zopfli* + install -d $out/lib + cp -d libzopfli* $out/lib + install -Dm444 -t $out/share/doc/zopfli ../README* ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Very good, but slow, deflate or zlib compression"; @@ -54,7 +53,7 @@ stdenv.mkDerivation rec { This library can only compress, not decompress. Existing zlib or deflate libraries can decompress the data. ''; - platforms = platforms.linux; + platforms = platforms.unix; license = licenses.asl20; maintainers = with maintainers; [ bobvanderlinden nckx ]; }; |