From 28c37155d7606db382afb2210b611525a3dca5d5 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 15 Oct 2019 19:14:33 -0400 Subject: [PATCH 1/6] xcode: Add more hashes, and fix some old ones --- pkgs/os-specific/darwin/xcode/default.nix | 8 +++++++- pkgs/top-level/darwin-packages.nix | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 62785f34fe84..3b60ccb64fd1 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -45,7 +45,13 @@ in lib.makeExtensible (self: { xcode_8_2 = requireXcode "8.2" "13nd1zsfqcp9hwp15hndr0rsbb8rgprrz7zr2ablj4697qca06m2"; xcode_9_1 = requireXcode "9.1" "0ab1403wy84ys3yn26fj78cazhpnslmh3nzzp1wxib3mr1afjvic"; xcode_9_2 = requireXcode "9.2" "1bgfgdp266cbbqf2axcflz92frzvhi0qw0jdkcw6r85kdpc8dj4c"; - xcode_9_4 = requireXcode "9.4" "132l92c702lm8yrc62w4b8n2iap1qzqvklqzi39x9832ajysn6vw"; + xcode_9_3 = requireXcode "9.3" "12m9kb4759s2ky42b1vf7y38qqxn2j99s99adzc6ljnmy26ii12w"; + xcode_9_4 = requireXcode "9.4" "00az1cf9pm8zmvzs6yq04prdmxp8xi3ymxw94jjh4mh7hlbkhcb7"; + xcode_9_4_1 = requireXcode "9.4.1" "0y9kphj86c14jl6aibv57sd7ln0w06vdhzm8ysp0s98rfgyq2lbw"; xcode_10_1 = requireXcode "10.1" "1ssdbg4v8r11fjf4jl38pwyry2aia1qihbxyxapz0v0n5gfnp05v"; + xcode_10_2 = requireXcode "10.2" "1xzybl1gvb3q5qwlwchanzpws4sb70i3plf0vrzvlfdp2hsb3pg7"; + xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg"; + xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb"; + xcode_11 = requireXcode "11" "1r03j3kkp4blfp2kqpn538w3dx57ms930fj8apjkq6dk7fv3jcqh"; xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}"; }) diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 5ef05061e8d5..9423aa307253 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -68,8 +68,12 @@ in usr-include = callPackage ../os-specific/darwin/usr-include { }; - inherit (callPackages ../os-specific/darwin/xcode { } ) - xcode_8_1 xcode_8_2 xcode_9_1 xcode_9_2 xcode_9_4 xcode; + inherit (callPackages ../os-specific/darwin/xcode { }) + xcode_8_1 xcode_8_2 + xcode_9_1 xcode_9_2 xcode_9_4 xcode_9_4_1 + xcode_10_2 xcode_10_2_1 xcode_10_3 + xcode_11 + xcode; CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { }; From 3432b1baa8612d1dfcb750e4bc8f27b171b8ee1a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 25 Nov 2019 23:50:21 -0500 Subject: [PATCH 2/6] =?UTF-8?q?xcode:=20don=E2=80=99t=20use=20libstdc++=20?= =?UTF-8?q?on=20iOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple no longer ships with it, so best to avoid forcing it into use. --- pkgs/os-specific/darwin/xcode/sdk-pkgs.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index d25edff49560..e8302a82555f 100644 --- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -7,6 +7,7 @@ , wrapCCWith , buildIosSdk, targetIosSdkPkgs , xcode +, lib }: let @@ -48,7 +49,7 @@ rec { tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp mv cc-cflags.tmp $out/nix-support/cc-cflags echo "-target ${targetPlatform.config} -arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/cc-cflags - echo "-isystem ${sdk}/usr/include -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++" >> $out/nix-support/cc-cflags + echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags '' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") '' echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags '' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") '' From 036cef94733d2af03f3732eb8673cf0744303972 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 3 Dec 2019 13:01:29 -0500 Subject: [PATCH 3/6] ghc: always use llvm with iOS Even when building for the simulator. --- pkgs/development/compilers/ghc/8.4.4.nix | 2 +- pkgs/development/compilers/ghc/8.6.5.nix | 2 +- pkgs/development/compilers/ghc/8.8.1.nix | 2 +- pkgs/development/compilers/ghc/head.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.4.4.nix b/pkgs/development/compilers/ghc/8.4.4.nix index 52fb926cdc68..96ad43e2e054 100644 --- a/pkgs/development/compilers/ghc/8.4.4.nix +++ b/pkgs/development/compilers/ghc/8.4.4.nix @@ -7,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) || stdenv.targetPlatform.isiOS , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/8.6.5.nix b/pkgs/development/compilers/ghc/8.6.5.nix index cdbcb8e1aedc..ae6a870bd4ee 100644 --- a/pkgs/development/compilers/ghc/8.6.5.nix +++ b/pkgs/development/compilers/ghc/8.6.5.nix @@ -10,7 +10,7 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/8.8.1.nix b/pkgs/development/compilers/ghc/8.8.1.nix index 95bbab3cb3e1..5719548a0121 100644 --- a/pkgs/development/compilers/ghc/8.8.1.nix +++ b/pkgs/development/compilers/ghc/8.8.1.nix @@ -10,7 +10,7 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index b78f5bc2204c..159e05fa7770 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -7,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. From 010d2f4aa29448b1908b954006484cfbbf7e7d50 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 25 Nov 2019 21:53:22 -0500 Subject: [PATCH 4/6] lib/systems: use newer ios sdk --- lib/systems/examples.nix | 16 ++++++++-------- pkgs/os-specific/darwin/xcode/default.nix | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 585156c24759..f20b37dbb7a5 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -164,8 +164,8 @@ rec { iphone64 = { config = "aarch64-apple-ios"; # config = "aarch64-apple-darwin14"; - sdkVer = "10.2"; - xcodeVer = "8.2"; + sdkVer = "12.4"; + xcodeVer = "10.3"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; platform = {}; @@ -174,8 +174,8 @@ rec { iphone32 = { config = "armv7a-apple-ios"; # config = "arm-apple-darwin10"; - sdkVer = "10.2"; - xcodeVer = "8.2"; + sdkVer = "12.4"; + xcodeVer = "10.3"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; platform = {}; @@ -184,8 +184,8 @@ rec { iphone64-simulator = { config = "x86_64-apple-ios"; # config = "x86_64-apple-darwin14"; - sdkVer = "10.2"; - xcodeVer = "8.2"; + sdkVer = "12.4"; + xcodeVer = "10.3"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; platform = {}; @@ -194,8 +194,8 @@ rec { iphone32-simulator = { config = "i686-apple-ios"; # config = "i386-apple-darwin11"; - sdkVer = "10.2"; - xcodeVer = "8.2"; + sdkVer = "12.4"; + xcodeVer = "10.3"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; platform = {}; diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index 3b60ccb64fd1..282afe13c34e 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -53,5 +53,5 @@ in lib.makeExtensible (self: { xcode_10_2_1 = requireXcode "10.2.1" "11sdb54nr0x7kp987qq839x6k5gdx7vqdxjiy5xm5279n1n47bmg"; xcode_10_3 = requireXcode "10.3" "1i628vfn6zad81fsz3zpc6z15chhskvyp8qnajp2wnpzvrwl6ngb"; xcode_11 = requireXcode "11" "1r03j3kkp4blfp2kqpn538w3dx57ms930fj8apjkq6dk7fv3jcqh"; - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "8.2")}"; + xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if stdenv.targetPlatform.useiOSPrebuilt then stdenv.targetPlatform.xcodeVer else "10.3")}"; }) From 6f8b2f3961ef19298cccce24faea0af15b0493eb Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 25 Nov 2019 21:48:26 -0500 Subject: [PATCH 5/6] cctools: only add libtool on native builds libtool is not really needed and it interferes with updateAutotoolsGnuConfigScriptsHook. So remove it when cross-compiling, but leave it in native to preserve hashes. --- pkgs/os-specific/darwin/cctools/port.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index ff8f3eb5e265..07e38b0b0152 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -30,7 +30,12 @@ let outputs = [ "out" "dev" ]; - nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; + nativeBuildInputs = [ autoconf automake ] + + # TODO: remove on next hash change, libtool is unnecessary with autoreconfHook + ++ stdenv.lib.optional (stdenv.targetPlatform == stdenv.hostPlatform) libtool + + ++ [ autoreconfHook ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; From 8b41b16a9f1210d8a4556a9c412072fffbf4fb95 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 26 Nov 2019 16:41:18 -0500 Subject: [PATCH 6/6] cctools: fixup gnu-config detection --- pkgs/os-specific/darwin/cctools/port.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index 07e38b0b0152..ff8f3eb5e265 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -30,12 +30,7 @@ let outputs = [ "out" "dev" ]; - nativeBuildInputs = [ autoconf automake ] - - # TODO: remove on next hash change, libtool is unnecessary with autoreconfHook - ++ stdenv.lib.optional (stdenv.targetPlatform == stdenv.hostPlatform) libtool - - ++ [ autoreconfHook ]; + nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi;