From 8a705ae4c6107f43c7fbcfad913dd2675f94086a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 29 Dec 2019 16:19:56 +0100 Subject: profiles: Add 'map-manifest-entries'. * guix/scripts/pack.scm (map-manifest-entries): Move to... * guix/profiles.scm (map-manifest-entries): ... here. --- guix/profiles.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guix/profiles.scm') diff --git a/guix/profiles.scm b/guix/profiles.scm index 616605151e..5b3b5bd5fe 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -93,6 +93,7 @@ manifest-pattern-output concatenate-manifests + map-manifest-entries manifest-remove manifest-add manifest-lookup @@ -520,6 +521,11 @@ procedure is here for backward-compatibility and will eventually vanish." "Concatenate the manifests listed in LST and return the resulting manifest." (manifest (append-map manifest-entries lst))) +(define (map-manifest-entries proc manifest) + "Apply PROC to all the entries of MANIFEST and return a new manifest." + (make-manifest + (map proc (manifest-entries manifest)))) + (define (entry-predicate pattern) "Return a procedure that returns #t when passed a manifest entry that matches NAME/OUTPUT/VERSION. OUTPUT and VERSION may be #f, in which case they -- cgit v1.2.3 From e51de34309be7ba8105be66d45d7da4a64883b08 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 24 Dec 2019 15:04:57 +0100 Subject: 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 ++++ 1 file changed, 4 insertions(+) (limited to 'guix/profiles.scm') diff --git a/guix/profiles.scm b/guix/profiles.scm index 5b3b5bd5fe..0d38b2513f 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017 Huang Ying ;;; Copyright © 2017 Maxim Cournoyer ;;; Copyright © 2019 Kyle Meyer +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; 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 -- cgit v1.2.3