mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
profiles: Fix profile-derivation cross-compilation.
* guix/store.scm (current-target-system): New exported monadic procedure. * guix/profiles.scm (profile-derivation): Set target at bind time using the above procedure.
This commit is contained in:
parent
3d8c77836b
commit
91be09de61
2 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
|
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
|
||||||
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
|
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
|
||||||
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1459,6 +1460,9 @@ (define* (profile-derivation manifest
|
||||||
(mlet* %store-monad ((system (if system
|
(mlet* %store-monad ((system (if system
|
||||||
(return system)
|
(return system)
|
||||||
(current-system)))
|
(current-system)))
|
||||||
|
(target (if target
|
||||||
|
(return target)
|
||||||
|
(current-target-system)))
|
||||||
(ok? (if allow-collisions?
|
(ok? (if allow-collisions?
|
||||||
(return #t)
|
(return #t)
|
||||||
(check-for-collisions manifest system
|
(check-for-collisions manifest system
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -159,6 +160,7 @@ (define-module (guix store)
|
||||||
%guile-for-build
|
%guile-for-build
|
||||||
current-system
|
current-system
|
||||||
set-current-system
|
set-current-system
|
||||||
|
current-target-system
|
||||||
text-file
|
text-file
|
||||||
interned-file
|
interned-file
|
||||||
interned-file-tree
|
interned-file-tree
|
||||||
|
@ -1816,6 +1818,11 @@ (define-inlinable (set-current-system system)
|
||||||
(lambda (state)
|
(lambda (state)
|
||||||
(values (%current-system system) state)))
|
(values (%current-system system) state)))
|
||||||
|
|
||||||
|
(define-inlinable (current-target-system)
|
||||||
|
;; Consult the %CURRENT-TARGET-SYSTEM fluid at bind time.
|
||||||
|
(lambda (state)
|
||||||
|
(values (%current-target-system) state)))
|
||||||
|
|
||||||
(define %guile-for-build
|
(define %guile-for-build
|
||||||
;; The derivation of the Guile to be used within the build environment,
|
;; The derivation of the Guile to be used within the build environment,
|
||||||
;; when using 'gexp->derivation' and co.
|
;; when using 'gexp->derivation' and co.
|
||||||
|
|
Loading…
Reference in a new issue