summary refs log tree commit diff
path: root/pkgs/development/python-modules/rpy2/r-libs-site.patch
blob: a55b6038bb4b64881055bf87c1f104da08e40715 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/rpy/rinterface/__init__.py b/rpy/rinterface/__init__.py
index 9362e57..1af258e 100644
--- a/rpy/rinterface/__init__.py
+++ b/rpy/rinterface/__init__.py
@@ -43,6 +43,15 @@ if not R_HOME:
 if not os.environ.get("R_HOME"):
     os.environ['R_HOME'] = R_HOME
 
+# path to libraries
+existing = os.environ.get('R_LIBS_SITE')
+if existing is not None:
+    prefix = existing + ':'
+else:
+    prefix = ''
+additional = '@NIX_R_LIBS_SITE@'
+os.environ['R_LIBS_SITE'] = prefix + additional
+
 if sys.platform == 'win32':
     _load_r_dll(R_HOME)