summary refs log tree commit diff
path: root/pkgs/development/libraries/libdeflate
diff options
context:
space:
mode:
authorEvils <evils.devils@protonmail.com>2023-02-13 16:34:48 +0100
committerEvils <evils.devils@protonmail.com>2023-02-15 01:51:48 +0100
commit3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0 (patch)
tree4f7ca20b748e1f65d3348442a0b3622befea05c7 /pkgs/development/libraries/libdeflate
parent545c7a31e5dedea4a6d372712a18e00ce097d462 (diff)
downloadnixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar.gz
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar.bz2
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar.lz
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar.xz
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.tar.zst
nixpkgs-3cf92a8760f7c20edc0b6fc45174cdf3a3cd86f0.zip
libdeflate: 1.8 -> 1.17
patch was included in 1.9
which also started exposing a libdeflate.pc
  which is wanted by KiCad

project switched to cmake in 1.15
Diffstat (limited to 'pkgs/development/libraries/libdeflate')
-rw-r--r--pkgs/development/libraries/libdeflate/default.nix36
1 files changed, 13 insertions, 23 deletions
diff --git a/pkgs/development/libraries/libdeflate/default.nix b/pkgs/development/libraries/libdeflate/default.nix
index 39b80238b71..acbed23326c 100644
--- a/pkgs/development/libraries/libdeflate/default.nix
+++ b/pkgs/development/libraries/libdeflate/default.nix
@@ -1,38 +1,28 @@
-{ stdenv, lib, fetchpatch, fetchFromGitHub, fixDarwinDylibNames, pkgsStatic }:
-
+{ lib
+, stdenv
+, fetchFromGitHub
+, fixDarwinDylibNames
+, pkgsStatic
+, cmake
+}:
 stdenv.mkDerivation rec {
   pname = "libdeflate";
-  version = "1.8";
+  version = "1.17";
 
   src = fetchFromGitHub {
     owner = "ebiggers";
     repo = "libdeflate";
     rev = "v${version}";
-    sha256 = "sha256-P7YbuhP2/zJCpE9dxZev1yy5oda8WKAHY84ZLTL8gVs=";
+    sha256 = "sha256-tKs8feGbeodOID8FPIUc/1LfBz1p0oN1Jfkv2OnA2qc=";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/ebiggers/libdeflate/commit/ee4d18872bfe09a32cfd031c716b9069a04a50a0.diff";
-      sha256 = "0d2lllg60zbbbch0w0qrcqijrgski8xlsy5llg3i684d66ci538a";
-    })
-  ];
-
-  postPatch = ''
-    substituteInPlace Makefile --replace /usr/local $out
-  '';
-
-  makeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "DISABLE_SHARED=1"];
+  cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
 
-  nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
-
-  configurePhase = ''
-    make programs/config.h
-  '';
-
-  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
   passthru.tests.static = pkgsStatic.libdeflate;
+
   meta = with lib; {
     description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
     license = licenses.mit;