diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix')
-rw-r--r-- | nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix new file mode 100644 index 000000000000..7b1492799ddb --- /dev/null +++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix @@ -0,0 +1,58 @@ +{ stdenv, appleDerivation, xcbuild, ncurses, libutil-new }: + +appleDerivation { + # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264 + + # pkill requires special private headers that are unavailable in + # NixPkgs. These ones are needed: + # - xpc/xpxc.h + # - os/base_private.h + # - _simple.h + # We disable it here for now. TODO: build pkill inside adv_cmds + + # We also disable locale here because of some issues with a missing + # "lstdc++". + patchPhase = '' + substituteInPlace adv_cmds.xcodeproj/project.pbxproj \ + --replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \ + --replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \ + --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' + ''; + + buildPhase = '' + targets=$(xcodebuild -list \ + | awk '/Targets:/{p=1;print;next} p&&/^\s*$/{p=0};p' \ + | tail -n +2 | sed 's/^[ \t]*//' \ + | grep -v -e Desktop -e Embedded -e mklocale -e colldef) + + for i in $targets; do + xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target $i + done + ''; + + # temporary install phase until xcodebuild has "install" support + installPhase = '' + mkdir -p $out/bin/ + install Products/Release/* $out/bin/ + + for n in 1 8; do + mkdir -p $out/share/man/man$n + install */*.$n $out/share/man/man$n + done + + mkdir -p $out/System/Library/LaunchDaemons + install fingerd/finger.plist $out/System/Library/LaunchDaemons + + # from variant_links.sh + # ln -s $out/bin/pkill $out/bin/pgrep + # ln -s $out/share/man/man1/pkill.1 $out/share/man/man1/pgrep.1 + ''; + + nativeBuildInputs = [ xcbuild ]; + buildInputs = [ ncurses libutil-new ]; + + meta = { + platforms = stdenv.lib.platforms.darwin; + maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; + }; +} |