aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2018-12-17 21:17:54 +0100
committerJulien Lepiller <julien@lepiller.eu>2018-12-17 21:30:46 +0100
commit2a6ba9ff6102f865761530687866f12397f06c36 (patch)
treece1f4ade3cc74108969bb469de8853b0d0fcab06 /gnu/packages/ocaml.scm
parentf2f956010c64503daa18cf8138a3264212969c3d (diff)
downloadpatches-2a6ba9ff6102f865761530687866f12397f06c36.tar
patches-2a6ba9ff6102f865761530687866f12397f06c36.tar.gz
gnu: opam: Fix package installation.
Opam builds packages in an isolated environment, but packages still assume they can access system tools like a compiler, make, etc... Mount /gnu and /run/current-system so these tools are also available to opam packages on GuixSD. * gnu/packages/ocaml.scm (opam)[arguments]: Fix bwrap.sh to also mount the store and the system profile in the opam environment.
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e4a76acc89..7ba5a6b4f9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -384,7 +384,13 @@ functional, imperative and object-oriented styles of programming.")
;; Use bwrap from the store directly.
(substitute* "src/state/shellscripts/bwrap.sh"
(("-v bwrap") (string-append "-v " bwrap))
- (("exec bwrap") (string-append "exec " bwrap)))
+ (("exec bwrap") (string-append "exec " bwrap))
+ ;; Mount /gnu and /run/current-system in the
+ ;; isolated environment when building with opam.
+ ;; This is necessary for packages to find external
+ ;; dependencies, such as a C compiler, make, etc...
+ (("^add_mounts ro /usr")
+ "add_mounts ro /gnu /run/current-system /usr"))
(substitute* "src/client/opamInitDefaults.ml"
(("\"bwrap\"") (string-append "\"" bwrap "\"")))
;; Build dependencies