summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
blob: a572d46ceab56c27bafa9af38a7e64fb9f5fa179 (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
{ stdenv, fetchurl, appleDerivation, xcbuildHook }:

appleDerivation rec {
  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 = ''
    mkdir -p $out/bin/
    install Products/Release/* $out/bin/

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