From 48595335f41f3a2778a79f77578832ab829ccaee Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 11 Oct 2017 15:13:27 -0400 Subject: [PATCH] Add system_cmds apple project Actually just build sysctl for now, as xcbuild segfaults. --- .../darwin/apple-source-releases/default.nix | 2 + .../system_cmds/default.nix | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/system_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 a8509d1f0095..d9fd00e8d966 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -42,6 +42,7 @@ let adv_cmds = "163"; file_cmds = "264.1.1"; shell_cmds = "187"; + system_cmds = "550.6"; }; "osx-10.11.5" = { Libc = "1082.50.1"; # 10.11.6 still unreleased :/ @@ -235,6 +236,7 @@ let 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" {}; + system_cmds = applePackage "system_cmds" "osx-10.11.6" "1h46j2c5v02pkv5d9fyv6cpgyg0lczvwicrx6r9s210cl03l77jl" {}; 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/system_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix new file mode 100644 index 000000000000..2247ef3ddd2f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/default.nix @@ -0,0 +1,37 @@ +{ stdenv, appleDerivation, xcbuild }: + +appleDerivation rec { + # xcbuild fails with: + # /nix/store/fc0rz62dh8vr648qi7hnqyik6zi5sqx8-xcbuild-wrapper/nix-support/setup-hook: line 1: 9083 Segmentation fault: 11 xcodebuild OTHER_CFLAGS="$NIX_CFLAGS_COMPILE" OTHER_CPLUSPLUSFLAGS="$NIX_CFLAGS_COMPILE" OTHER_LDFLAGS="$NIX_LDFLAGS" build + # buildInputs = [ xcbuild ]; + + # # temporary install phase until xcodebuild has "install" support + # installPhase = '' + # mkdir -p $out/bin/ + # install system_cmds-*/Build/Products/Release/* $out/bin/ + + # for n in 1 5 8; do + # mkdir -p $out/share/man/man$n + # install */*.$n $out/share/man/man$n + # done + # ''; + + # For now we just build sysctl because that's all I need... Please open a + # PR if you need any other utils before we fix the xcodebuild. + buildPhase = "cc sysctl.tproj/sysctl.c -o sysctl"; + + installPhase = + '' + mkdir -p $out/bin + install sysctl $out/bin + for n in 5 8; do + mkdir -p $out/share/man/man$n + install sysctl.tproj/*.$n $out/share/man/man$n + done + ''; + + meta = { + platforms = stdenv.lib.platforms.darwin; + maintainers = with stdenv.lib.maintainers; [ shlevy ]; + }; +}