summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-09-21 20:05:29 +0200
committerDaiderd Jordan <daiderd@gmail.com>2017-09-21 20:48:56 +0200
commit1ae204d2fab96b2aebc59c232f78a116db2b640b (patch)
tree80bb851296c92e64413e81e349e0e4a1a6abf6d7
parenta3ba600366f9c2892b9fed3856c528af3a0fe075 (diff)
downloadnixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar.gz
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar.bz2
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar.lz
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar.xz
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.tar.zst
nixpkgs-1ae204d2fab96b2aebc59c232f78a116db2b640b.zip
zroc-ice: cleanup and fix darwin build
-rw-r--r--pkgs/development/libraries/zeroc-ice/default.nix19
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 15 insertions, 8 deletions
diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix
index e41dfbc6a72..8527832ad9c 100644
--- a/pkgs/development/libraries/zeroc-ice/default.nix
+++ b/pkgs/development/libraries/zeroc-ice/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchFromGitHub, mcpp, bzip2, expat, openssl, db5 }:
+{ stdenv, fetchFromGitHub, mcpp, bzip2, expat, openssl, db5
+, darwin, libiconv, Security
+}:
 
 stdenv.mkDerivation rec {
   name = "zeroc-ice-${version}";
@@ -11,17 +13,20 @@ stdenv.mkDerivation rec {
     sha256 = "05xympbns32aalgcfcpxwfd7bvg343f16xpg6jv5s335ski3cjy2";
   };
 
-  buildInputs = [ mcpp bzip2 expat openssl db5 ];
+  buildInputs = [ mcpp bzip2 expat openssl db5 ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools libiconv Security ];
 
-  buildPhase = ''
-    cd cpp
-    make -j $NIX_BUILD_CORES OPTIMIZE=yes
+  postUnpack = ''
+    sourceRoot=$sourceRoot/cpp
   '';
 
-  installPhase = ''
-    make -j $NIX_BUILD_CORES prefix=$out install
+  prePatch = ''
+    substituteInPlace config/Make.rules.Darwin \
+        --replace xcrun ""
   '';
 
+  makeFlags = [ "prefix=$(out)" "OPTIMIZE=yes" ];
+
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1c418fa9f76..395fb83cfe7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17208,7 +17208,9 @@ with pkgs;
 
   zed = callPackage ../applications/editors/zed { };
 
-  zeroc_ice = callPackage ../development/libraries/zeroc-ice { };
+  zeroc_ice = callPackage ../development/libraries/zeroc-ice {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
 
   zexy = callPackage ../applications/audio/pd-plugins/zexy  { };