mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 02:51:18 +00:00
63b39af496
- make sure libreadline is found at runtime - make sure python libraries are found at runtime - add libraries necessary to pass the testsuite and standard libraries
26 lines
599 B
Nix
26 lines
599 B
Nix
{ stdenv, R, makeWrapper, recommendedPackages, packages }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = R.name + "-wrapper";
|
|
|
|
buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages;
|
|
|
|
# Make the list of recommended R packages accessible to other packages such as rpy2
|
|
passthru.recommendedPackages = recommendedPackages;
|
|
|
|
unpackPhase = ":";
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cd ${R}/bin
|
|
for exe in *; do
|
|
makeWrapper ${R}/bin/$exe $out/bin/$exe \
|
|
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|