diff options
author | Justin Bedő <cu@cua0.org> | 2023-03-08 03:52:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 03:52:05 +0000 |
commit | 4f4a054dd226654be67f839047abb907e475a41a (patch) | |
tree | 34d72fe82cd384286f587e1e5891ae998cfa566f /pkgs/development/r-modules | |
parent | aead85d8dda45d2258ebb2427423d1e6445e8dda (diff) | |
parent | 7939447527bf256129c8b44883f31edb261de165 (diff) | |
download | nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar.gz nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar.bz2 nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar.lz nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar.xz nixlib-4f4a054dd226654be67f839047abb907e475a41a.tar.zst nixlib-4f4a054dd226654be67f839047abb907e475a41a.zip |
Merge pull request #219439 from nviets/sparklyr
rPackages: sparklyr environment variables
Diffstat (limited to 'pkgs/development/r-modules')
-rw-r--r-- | pkgs/development/r-modules/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 6d6814e3f66a..7c67bbd2f2c6 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -1275,6 +1275,17 @@ let ''; }); + sparklyr = old.sparklyr.overrideAttrs (attrs: { + # Pyspark's spark is full featured and better maintained than pkgs.spark + preConfigure = '' + substituteInPlace R/zzz.R \ + --replace ".onLoad <- function(...) {" \ + ".onLoad <- function(...) { + Sys.setenv(\"SPARK_HOME\" = Sys.getenv(\"SPARK_HOME\", unset = \"${pkgs.python3Packages.pyspark}/lib/${pkgs.python3Packages.python.libPrefix}/site-packages/pyspark\")) + Sys.setenv(\"JAVA_HOME\" = Sys.getenv(\"JAVA_HOME\", unset = \"${pkgs.jdk}\"))" + ''; + }); + proj4 = old.proj4.overrideAttrs (attrs: { preConfigure = '' substituteInPlace configure \ |