summary refs log tree commit diff
path: root/pkgs/development/interpreters/racket
diff options
context:
space:
mode:
authorClaes Wallin (韋嘉誠) <claes.wallin@greatsinodevelopment.com>2018-02-05 14:28:17 +0800
committerClaes Wallin (韋嘉誠) <claes.wallin@greatsinodevelopment.com>2018-02-22 01:27:16 +0800
commitfdbc7448569a25a03a2d09f8def1f96a266362f4 (patch)
treec8d66bf75768a978afd630b9fe9f98f91690f8ed /pkgs/development/interpreters/racket
parentec2e601871c9eab2056b7ce02f5ac85a70b5314e (diff)
downloadnixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar.gz
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar.bz2
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar.lz
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar.xz
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.tar.zst
nixpkgs-fdbc7448569a25a03a2d09f8def1f96a266362f4.zip
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.
Diffstat (limited to 'pkgs/development/interpreters/racket')
-rw-r--r--pkgs/development/interpreters/racket/default.nix9
-rw-r--r--pkgs/development/interpreters/racket/minimal.nix2
2 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix
index 4a980ec418f..e3aa3e8a6f5 100644
--- a/pkgs/development/interpreters/racket/default.nix
+++ b/pkgs/development/interpreters/racket/default.nix
@@ -4,6 +4,7 @@
 , libpng, libtool, mpfr, openssl, pango, poppler
 , readline, sqlite
 , disableDocs ? false
+, CoreFoundation
 }:
 
 let
@@ -47,9 +48,13 @@ stdenv.mkDerivation rec {
 
   FONTCONFIG_FILE = fontsConf;
   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 = ''
     unset AR
diff --git a/pkgs/development/interpreters/racket/minimal.nix b/pkgs/development/interpreters/racket/minimal.nix
index 6bac9a0f341..c63d0040cfe 100644
--- a/pkgs/development/interpreters/racket/minimal.nix
+++ b/pkgs/development/interpreters/racket/minimal.nix
@@ -14,6 +14,6 @@ racket.overrideAttrs (oldAttrs: rec {
       as well as libraries that live in collections. In particular, raco
       and the pkg library are still bundled.
     '';
-    platforms = [ "x86_64-linux" "aarch64-linux" ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
   };
 })