about summary refs log tree commit diff
path: root/pkgs/tools/package-management
diff options
context:
space:
mode:
authorMarc Seeger <mseeger@fb.com>2020-12-17 07:43:09 -0800
committerMarc Seeger <mseeger@fb.com>2020-12-19 11:37:08 -0800
commit8718533c22ae51ae687ea24389a4bd20fd53dc0e (patch)
tree007cd19d8963b39a41dad5d35f1b74ce22cc07fa /pkgs/tools/package-management
parentf654cad7c855a9c81e5d5d59e42e3cc393bbe469 (diff)
downloadnixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar.gz
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar.bz2
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar.lz
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar.xz
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.tar.zst
nixlib-8718533c22ae51ae687ea24389a4bd20fd53dc0e.zip
librepo: add darwin support
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r--pkgs/tools/package-management/librepo/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/tools/package-management/librepo/default.nix b/pkgs/tools/package-management/librepo/default.nix
index 0e2cec685206..f636560844b2 100644
--- a/pkgs/tools/package-management/librepo/default.nix
+++ b/pkgs/tools/package-management/librepo/default.nix
@@ -35,11 +35,12 @@ stdenv.mkDerivation rec {
     libxml2
     glib
     openssl
-    zchunk
     curl
     check
     gpgme
-  ];
+  ]
+  # zchunk currently has issues compiling in darwin, fine in linux
+  ++ stdenv.lib.optional stdenv.isLinux zchunk;
 
   # librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
   propagatedBuildInputs = [
@@ -50,7 +51,7 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}"
-  ];
+  ] ++ stdenv.lib.optional stdenv.isDarwin "-DWITH_ZCHUNK=OFF";
 
   postFixup = ''
     moveToOutput "lib/${python.libPrefix}" "$py"
@@ -60,7 +61,7 @@ stdenv.mkDerivation rec {
     description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
     homepage = "https://rpm-software-management.github.io/librepo/";
     license = licenses.lgpl2Plus;
-    platforms = platforms.linux;
+    platforms = platforms.linux ++ platforms.darwin;
     maintainers = with maintainers; [ copumpkin ];
   };
 }