summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2016-12-13 17:00:50 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2016-12-14 21:18:09 -0600
commit83c7660279eef8b7e46c520846948224240390a7 (patch)
tree2c05f3e679f43f38cf585ffd558c88f522af4053 /pkgs/os-specific/darwin/apple-source-releases
parentd295d6860965622d7e565d3edc2f29a234aa527c (diff)
downloadnixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar.gz
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar.bz2
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar.lz
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar.xz
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.tar.zst
nixpkgs-83c7660279eef8b7e46c520846948224240390a7.zip
shell_cmds: init at 187
fixes #11707
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/default.nix2
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/shell_cmds/default.nix45
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix
index 69dc2283645..770a466a9f5 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 00000000000..f434e15794e
--- /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 ];
+  };
+}