summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
blob: a9d06fc9dbc366e8473a92d5ad52a26de918cb1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, cctools, appleDerivation }:

appleDerivation {
  buildInputs = [ cctools ];

  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
  '';
}