Merge pull request #44369 from mnacamura/build-r-package

rPackages: export buildRPackage
This commit is contained in:
Peter Simons 2018-08-02 18:35:10 +02:00 committed by GitHub
commit 5acbe81573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -216,7 +216,8 @@ let
# `self` is `_self` with overridden packages;
# packages in `_self` may depends on overridden packages.
self = (defaultOverrides _self self) // overrides;
_self = import ./bioc-packages.nix { inherit self; derive = deriveBioc; } //
_self = { inherit buildRPackage; } //
import ./bioc-packages.nix { inherit self; derive = deriveBioc; } //
import ./bioc-annotation-packages.nix { inherit self; derive = deriveBiocAnn; } //
import ./bioc-experiment-packages.nix { inherit self; derive = deriveBiocExp; } //
import ./cran-packages.nix { inherit self; derive = deriveCran; };

View File

@ -1,10 +1,10 @@
{ stdenv, R, libcxx, xvfb_run, utillinux, Cocoa, Foundation, gettext, gfortran }:
{ name, buildInputs ? [], ... } @ attrs:
{ name, buildInputs ? [], requireX ? false, ... } @ attrs:
stdenv.mkDerivation ({
buildInputs = buildInputs ++ [R gettext] ++
stdenv.lib.optionals attrs.requireX [utillinux xvfb_run] ++
stdenv.lib.optionals requireX [utillinux xvfb_run] ++
stdenv.lib.optionals stdenv.isDarwin [Cocoa Foundation gfortran];
NIX_CFLAGS_COMPILE =
@ -26,7 +26,7 @@ stdenv.mkDerivation ({
else
[ "--no-test-load" ];
rCommand = if attrs.requireX or false then
rCommand = if requireX then
# Unfortunately, xvfb-run has a race condition even with -a option, so that
# we acquire a lock explicitly.
"flock ${xvfb_run} xvfb-run -a -e xvfb-error R"