[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: profiles: Fix profile-derivation cross-compilation.
From: |
guix-commits |
Subject: |
01/05: profiles: Fix profile-derivation cross-compilation. |
Date: |
Sun, 29 Dec 2019 15:27:51 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit e51de34309be7ba8105be66d45d7da4a64883b08
Author: Mathieu Othacehe <address@hidden>
Date: Tue Dec 24 15:04:57 2019 +0100
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.
---
guix/profiles.scm | 4 ++++
guix/store.scm | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 5b3b5bd..0d38b25 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2017 Huang Ying <address@hidden>
;;; Copyright © 2017 Maxim Cournoyer <address@hidden>
;;; Copyright © 2019 Kyle Meyer <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1463,6 +1464,9 @@ are cross-built for TARGET."
(mlet* %store-monad ((system (if system
(return system)
(current-system)))
+ (target (if target
+ (return target)
+ (current-target-system)))
(ok? (if allow-collisions?
(return #t)
(check-for-collisions manifest system
diff --git a/guix/store.scm b/guix/store.scm
index cf25d34..f99fa58 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès
<address@hidden>
;;; Copyright © 2018 Jan Nieuwenhuizen <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -159,6 +160,7 @@
%guile-for-build
current-system
set-current-system
+ current-target-system
text-file
interned-file
interned-file-tree
@@ -1816,6 +1818,11 @@ the store."
(lambda (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
;; The derivation of the Guile to be used within the build environment,
;; when using 'gexp->derivation' and co.