summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
blob: 21971ea2e284d33fcc0157edef64054f447f41bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, appleDerivation, xcbuildHook }:

appleDerivation {
  nativeBuildInputs = [ xcbuildHook ];

  patchPhase = ''
    substituteInPlace rpcgen/rpc_main.c \
      --replace "/usr/bin/cpp" "${stdenv.cc}/bin/cpp"
  '';

  # temporary install phase until xcodebuild has "install" support
  installPhase = ''
    for f in Products/Release/*; do
      if [ -f $f ]; then
        install -D $f $out/bin/$(basename $f)
      fi
    done

    for n in 1; do
      mkdir -p $out/share/man/man$n
      install */*.$n $out/share/man/man$n
    done
  '';

  meta = {
    platforms = stdenv.lib.platforms.darwin;
    maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
  };
}