Merge pull request #136959 from jbedo/rPackages-h2o

rPackages.h2o: disable JAR fetching while in nix build
This commit is contained in:
Justin Bedő 2021-10-15 11:46:15 +11:00 committed by GitHub
commit e694aa12b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1065,6 +1065,18 @@ let
}) ];
});
h2o = old.h2o.overrideDerivation (attrs: {
preConfigure = ''
# prevent download of jar file during install and postpone to first use
sed -i '/downloadJar()/d' R/zzz.R
# during runtime the package directory is not writable as it's in the
# nix store, so store the jar in the user's cache directory instead
substituteInPlace R/connection.R --replace \
'dest_file <- file.path(dest_folder, "h2o.jar")' \
'dest_file <- file.path("~/.cache/", "h2o.jar")'
'';
});
};
in
self