2020-04-24 23:36:52 +00:00
|
|
|
diff --git a/rpy2/rinterface_lib/embedded.py b/rpy2/rinterface_lib/embedded.py
|
2022-08-12 12:06:08 +00:00
|
|
|
index ccd3a315..51fb5da4 100644
|
2020-04-24 23:36:52 +00:00
|
|
|
--- a/rpy2/rinterface_lib/embedded.py
|
|
|
|
+++ b/rpy2/rinterface_lib/embedded.py
|
2022-08-12 12:06:08 +00:00
|
|
|
@@ -276,6 +276,16 @@ def _initr(
|
|
|
|
os.environ.get('LD_LIBRARY_PATH', ''))
|
|
|
|
)
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
+
|
|
|
|
+ # 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
|
|
|
|
+
|
|
|
|
options_c = [ffi.new('char[]', o.encode('ASCII')) for o in _options]
|
|
|
|
n_options = len(options_c)
|
|
|
|
n_options_c = ffi.cast('int', n_options)
|