R: fix Darwin build
Merged manually from https://github.com/NixOS/nixpkgs/pull/10623.
This commit is contained in:
committed by
Peter Simons
parent
26f80d7a6f
commit
a225a650bf
@@ -5,7 +5,10 @@
|
||||
let
|
||||
inherit (pkgs) fetchurl stdenv lib;
|
||||
|
||||
buildRPackage = pkgs.callPackage ./generic-builder.nix { inherit R; };
|
||||
buildRPackage = pkgs.callPackage ./generic-builder.nix {
|
||||
inherit R;
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa Foundation;
|
||||
};
|
||||
|
||||
# Generates package templates given per-repository settings
|
||||
#
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
{ stdenv, R, xvfb_run, utillinux }:
|
||||
{ stdenv, R, libcxx, xvfb_run, utillinux, Cocoa, Foundation }:
|
||||
|
||||
{ name, buildInputs ? [], ... } @ attrs:
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
buildInputs = buildInputs ++ [R] ++
|
||||
stdenv.lib.optionals attrs.requireX [utillinux xvfb_run];
|
||||
stdenv.lib.optionals attrs.requireX [utillinux xvfb_run] ++
|
||||
stdenv.lib.optionals stdenv.isDarwin [Cocoa Foundation];
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
Reference in New Issue
Block a user