Merge pull request #35285 from clacke/racket-darwin

racket-minimal: build on darwin
This commit is contained in:
Daiderd Jordan
2018-02-21 21:07:20 +01:00
committed by GitHub
3 changed files with 12 additions and 4 deletions
@@ -4,6 +4,7 @@
, libpng, libtool, mpfr, openssl, pango, poppler , libpng, libtool, mpfr, openssl, pango, poppler
, readline, sqlite , readline, sqlite
, disableDocs ? false , disableDocs ? false
, CoreFoundation
}: }:
let let
@@ -47,9 +48,13 @@ stdenv.mkDerivation rec {
FONTCONFIG_FILE = fontsConf; FONTCONFIG_FILE = fontsConf;
LD_LIBRARY_PATH = libPath; LD_LIBRARY_PATH = libPath;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-lgcc_s"; NIX_LDFLAGS = stdenv.lib.concatStringsSep " " [
(stdenv.lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s")
(stdenv.lib.optionalString stdenv.isDarwin "-framework CoreFoundation")
];
buildInputs = [ fontconfig libffi libtool makeWrapper sqlite ]; buildInputs = [ fontconfig libffi libtool makeWrapper sqlite ]
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation ];
preConfigure = '' preConfigure = ''
unset AR unset AR
@@ -14,6 +14,6 @@ racket.overrideAttrs (oldAttrs: rec {
as well as libraries that live in collections. In particular, raco as well as libraries that live in collections. In particular, raco
and the pkg library are still bundled. and the pkg library are still bundled.
''; '';
platforms = [ "x86_64-linux" "aarch64-linux" ]; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
}; };
}) })
+4 -1
View File
@@ -5822,6 +5822,8 @@ with pkgs;
extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc; extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc;
}; };
gcc7Stdenv = overrideCC gccStdenv gcc7;
wrapCCMulti = cc: wrapCCMulti = cc:
if system == "x86_64-linux" then let if system == "x86_64-linux" then let
# Binutils with glibc multi # Binutils with glibc multi
@@ -7102,7 +7104,8 @@ with pkgs;
# racket 6.11 doesn't build with gcc6 + recent glibc: # racket 6.11 doesn't build with gcc6 + recent glibc:
# https://github.com/racket/racket/pull/1886 # https://github.com/racket/racket/pull/1886
# https://github.com/NixOS/nixpkgs/pull/31017#issuecomment-343574769 # https://github.com/NixOS/nixpkgs/pull/31017#issuecomment-343574769
stdenv = overrideCC stdenv gcc7; stdenv = if stdenv.isDarwin then stdenv else gcc7Stdenv;
inherit (darwin.apple_sdk.frameworks) CoreFoundation;
}; };
racket-minimal = callPackage ../development/interpreters/racket/minimal.nix { }; racket-minimal = callPackage ../development/interpreters/racket/minimal.nix { };