From 559997179d612b57bbf8ad0f230235d8c34ae36d Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Fri, 3 Aug 2018 00:50:58 +0900 Subject: [PATCH 1/2] rPackages: export buildRPackage --- pkgs/development/r-modules/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index acaee897d93..a52b74ae080 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -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; }; From 0a541aa38c47108bffb1c78cef0e09e125cc6023 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Fri, 3 Aug 2018 01:06:36 +0900 Subject: [PATCH 2/2] rPackages.buildRPackage: fix error if requireX is missing --- pkgs/development/r-modules/generic-builder.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix index 0d731de33f8..76bf29abc17 100644 --- a/pkgs/development/r-modules/generic-builder.nix +++ b/pkgs/development/r-modules/generic-builder.nix @@ -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"