about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix')
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
new file mode 100644
index 000000000000..761ff3ea9252
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
@@ -0,0 +1,23 @@
+{ appleDerivation }:
+
+appleDerivation {
+  patches = [ ./clang-5.patch ];
+
+  postPatch = ''
+    substituteInPlace makefile \
+      --replace /usr/bin/ "" \
+      --replace '$(ISYSROOT)' "" \
+      --replace 'shell xcodebuild -version -sdk' 'shell true' \
+      --replace 'shell xcrun -sdk $(SDKPATH) -find' 'shell echo' \
+      --replace '-install_name $(libdir)' "-install_name $out/lib/" \
+      --replace /usr/local/bin/ /bin/ \
+      --replace /usr/lib/ /lib/ \
+  '';
+
+  makeFlags = [ "DSTROOT=$(out)" ];
+
+  postInstall = ''
+    mv $out/usr/local/include $out/include
+    rm -rf $out/usr
+  '';
+}