diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 0bb02d0f989d..1d23bb692cf1 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -3,9 +3,9 @@ { R, pkgs, overrides }: let - inherit (pkgs) fetchurl stdenv lib xvfb_run utillinux; + inherit (pkgs) fetchurl stdenv lib; - buildRPackage = import ./generic-builder.nix { inherit R xvfb_run utillinux ; }; + buildRPackage = pkgs.callPackage ./generic-builder.nix { inherit R; }; # Package template # diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix index bca7c10e0fd2..45c377635c90 100644 --- a/pkgs/development/r-modules/generic-builder.nix +++ b/pkgs/development/r-modules/generic-builder.nix @@ -1,9 +1,10 @@ -{ R, xvfb_run, utillinux }: +{ stdenv, R, xvfb_run, utillinux }: { name, buildInputs ? [], ... } @ attrs: -R.stdenv.mkDerivation ({ - buildInputs = buildInputs ++ [R xvfb_run utillinux]; +stdenv.mkDerivation ({ + buildInputs = buildInputs ++ [R] ++ + stdenv.lib.optionals attrs.requireX [utillinux xvfb_run]; configurePhase = '' runHook preConfigure