about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/R/setup-hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/R/setup-hook.sh')
-rw-r--r--nixpkgs/pkgs/applications/science/math/R/setup-hook.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/R/setup-hook.sh b/nixpkgs/pkgs/applications/science/math/R/setup-hook.sh
new file mode 100644
index 000000000000..6951e2a4b61b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/R/setup-hook.sh
@@ -0,0 +1,7 @@
+addRLibPath () {
+    if [[ -d "$1/library" ]]; then
+        addToSearchPath R_LIBS_SITE "$1/library"
+    fi
+}
+
+addEnvHooks "$targetOffset" addRLibPath