diff options
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases/adv_cmds')
-rw-r--r-- | pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix | 11 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix | 25 |
2 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix index 2a2d4cbe493..2ca2d061591 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix @@ -1,4 +1,4 @@ -{ stdenv, appleDerivation, fetchzip, bsdmake, perl, flex, yacc +{ lib, stdenv, buildPackages, appleDerivation, fetchzip, bsdmake, perl, flex, bison }: # this derivation sucks @@ -16,7 +16,8 @@ let recentAdvCmds = fetchzip { }; in appleDerivation { - nativeBuildInputs = [ bsdmake perl yacc flex ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ bsdmake perl bison flex ]; buildInputs = [ flex ]; patchPhase = '' @@ -61,7 +62,7 @@ in appleDerivation { bsdmake -C usr-share-locale.tproj - clang ${recentAdvCmds}/ps/*.c -o ps + ${stdenv.cc.targetPrefix}clang ${recentAdvCmds}/ps/*.c -o ps ''; installPhase = '' @@ -85,7 +86,7 @@ in appleDerivation { setOutputFlags = false; meta = { - platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; + platforms = lib.platforms.darwin; + maintainers = with lib.maintainers; [ gridaphobe ]; }; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix index 0cbd7d81b90..6e659df4d62 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix @@ -1,29 +1,24 @@ -{ stdenv, appleDerivation, xcbuild, ncurses, libutil }: +{ lib, appleDerivation, xcbuild, ncurses, libutil }: appleDerivation { # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264 + patchPhase = '' + substituteInPlace adv_cmds.xcodeproj/project.pbxproj \ + --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' + ''; + # 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) + | grep -v -e Desktop -e Embedded -e mklocale -e pkill -e pgrep -e colldef) for i in $targets; do xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target $i @@ -34,7 +29,7 @@ appleDerivation { installPhase = '' for f in Products/Release/*; do if [ -f $f ]; then - install -D $file $out/bin/$(basename $f) + install -D $f $out/bin/$(basename $f) fi done @@ -50,7 +45,7 @@ appleDerivation { buildInputs = [ ncurses libutil ]; meta = { - platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; + platforms = lib.platforms.darwin; + maintainers = with lib.maintainers; [ matthewbauer ]; }; } |