From 83c7660279eef8b7e46c520846948224240390a7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 13 Dec 2016 17:00:50 -0600 Subject: [PATCH] shell_cmds: init at 187 fixes #11707 --- .../darwin/apple-source-releases/default.nix | 2 + .../shell_cmds/default.nix | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index 69dc22836453..770a466a9f5d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -40,6 +40,7 @@ let basic_cmds = "55"; adv_cmds = "163"; file_cmds = "264.1.1"; + shell_cmds = "187"; }; "osx-10.11.5" = { Libc = "1082.50.1"; # 10.11.6 still unreleased :/ @@ -233,6 +234,7 @@ let developer_cmds = applePackage "developer_cmds" "osx-10.11.6" "1r9c2b6dcl22diqf90x58psvz797d3lxh4r2wppr7lldgbgn24di" {}; network_cmds = applePackage "network_cmds" "osx-10.11.6" "0lhi9wz84qr1r2ab3fb4nvmdg9gxn817n5ldg7zw9gnf3wwn42kw" {}; file_cmds = applePackage "file_cmds" "osx-10.11.6" "1zfxbmasps529pnfdjvc13p7ws2cfx8pidkplypkswyff0nff4wp" {}; + shell_cmds = applePackage "shell_cmds" "osx-10.11.6" "0084k271v66h4jqp7q7rmjvv7w4mvhx3aq860qs8jbd30canm86n" {}; libsecurity_apple_csp = libsecPackage "libsecurity_apple_csp" "osx-10.7.5" "1ngyn1ik27n4x981px3kfd1z1n8zx7r5w812b6qfjpy5nw4h746w" {}; libsecurity_apple_cspdl = libsecPackage "libsecurity_apple_cspdl" "osx-10.7.5" "1svqa5fhw7p7njzf8bzg7zgc5776aqjhdbnlhpwmr5hmz5i0x8r7" {}; diff --git a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix new file mode 100644 index 000000000000..f434e15794ea --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix @@ -0,0 +1,45 @@ +{ stdenv, appleDerivation, xcbuild }: + +appleDerivation rec { + buildInputs = [ xcbuild ]; + + patchPhase = '' + # NOTE: these hashes must be recalculated for each version change + + # disables: + # - su ('security/pam_appl.h' file not found) + # - find (Undefined symbol '_get_date') + # - w (Undefined symbol '_res_9_init') + substituteInPlace shell_cmds.xcodeproj/project.pbxproj \ + --replace "FCBA168714A146D000AA698B /* PBXTargetDependency */," "" \ + --replace "FCBA165914A146D000AA698B /* PBXTargetDependency */," "" \ + --replace "FCBA169514A146D000AA698B /* PBXTargetDependency */," "" + + # disable w, test install + # get rid of permission stuff + substituteInPlace xcodescripts/install-files.sh \ + --replace 'ln -f "$BINDIR/w" "$BINDIR/uptime"' "" \ + --replace 'ln -f "$DSTROOT/bin/test" "$DSTROOT/bin/["' "" \ + --replace "-o root -g wheel -m 0755" "" \ + --replace "-o root -g wheel -m 0644" "" + ''; + + # temporary install phase until xcodebuild has "install" support + installPhase = '' + mkdir -p $out/usr/bin + install shell_cmds-*/Build/Products/Release/* $out/usr/bin + + export DSTROOT=$out + export SRCROOT=$PWD + . xcodescripts/install-files.sh + + mv $out/usr/* $out + mv $out/private/etc $out + rmdir $out/usr $out/private + ''; + + meta = { + platforms = stdenv.lib.platforms.darwin; + maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; + }; +}