3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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.
This commit is contained in:
Julien Lepiller 2018-12-17 21:17:54 +01:00
parent f2f956010c
commit 2a6ba9ff61
No known key found for this signature in database
GPG key ID: 43111F4520086A0C

View file

@ -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