Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

racket-minimal: build on darwin

Technically, racket compiles and packages too, but it doesn't pass all
tests yet, so the build fails.

gcc7Stdenv is GCC 7 with the MacOS-specific adaptations retained.
Building on MacOS with that works, but we should be using clang.

I'm hoping that the next person wanting to override the compiler
version in some other derivation sees that attribute and doesn't
inadvertently break a MacOS build again.

+12 -4
+7 -2
pkgs/development/interpreters/racket/default.nix
··· 4 , libpng, libtool, mpfr, openssl, pango, poppler 5 , readline, sqlite 6 , disableDocs ? false 7 }: 8 9 let ··· 47 48 FONTCONFIG_FILE = fontsConf; 49 LD_LIBRARY_PATH = libPath; 50 - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s"; 51 52 - buildInputs = [ fontconfig libffi libtool makeWrapper sqlite ]; 53 54 preConfigure = '' 55 unset AR
··· 4 , libpng, libtool, mpfr, openssl, pango, poppler 5 , readline, sqlite 6 , disableDocs ? false 7 + , CoreFoundation 8 }: 9 10 let ··· 48 49 FONTCONFIG_FILE = fontsConf; 50 LD_LIBRARY_PATH = libPath; 51 + NIX_LDFLAGS = stdenv.lib.concatStringsSep " " [ 52 + (stdenv.lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s") 53 + (stdenv.lib.optionalString stdenv.isDarwin "-framework CoreFoundation") 54 + ]; 55 56 + buildInputs = [ fontconfig libffi libtool makeWrapper sqlite ] 57 + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation ]; 58 59 preConfigure = '' 60 unset AR
+1 -1
pkgs/development/interpreters/racket/minimal.nix
··· 14 as well as libraries that live in collections. In particular, raco 15 and the pkg library are still bundled. 16 ''; 17 - platforms = [ "x86_64-linux" "aarch64-linux" ]; 18 }; 19 })
··· 14 as well as libraries that live in collections. In particular, raco 15 and the pkg library are still bundled. 16 ''; 17 + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; 18 }; 19 })
+4 -1
pkgs/top-level/all-packages.nix
··· 5822 extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc; 5823 }; 5824 5825 wrapCCMulti = cc: 5826 if system == "x86_64-linux" then let 5827 # Binutils with glibc multi ··· 7102 # racket 6.11 doesn't build with gcc6 + recent glibc: 7103 # https://github.com/racket/racket/pull/1886 7104 # https://github.com/NixOS/nixpkgs/pull/31017#issuecomment-343574769 7105 - stdenv = overrideCC stdenv gcc7; 7106 }; 7107 racket-minimal = callPackage ../development/interpreters/racket/minimal.nix { }; 7108
··· 5822 extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc; 5823 }; 5824 5825 + gcc7Stdenv = overrideCC gccStdenv gcc7; 5826 + 5827 wrapCCMulti = cc: 5828 if system == "x86_64-linux" then let 5829 # Binutils with glibc multi ··· 7104 # racket 6.11 doesn't build with gcc6 + recent glibc: 7105 # https://github.com/racket/racket/pull/1886 7106 # https://github.com/NixOS/nixpkgs/pull/31017#issuecomment-343574769 7107 + stdenv = if stdenv.isDarwin then stdenv else gcc7Stdenv; 7108 + inherit (darwin.apple_sdk.frameworks) CoreFoundation; 7109 }; 7110 racket-minimal = callPackage ../development/interpreters/racket/minimal.nix { }; 7111