From 344e39c928bdb8e6b7e5ac79d94535921a414a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 19 Oct 2023 16:39:06 +0200 Subject: =?UTF-8?q?profiles:=20Hooks=20honor=20the=20#:system=20parameter?= =?UTF-8?q?=20of=20=E2=80=98profile-derivation=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * guix/profiles.scm (info-dir-file, package-cache-file) (info-dir-file, ghc-package-cache-file, ca-certificate-bundle) (emacs-subdirs, gdk-pixbuf-loaders-cache-file, glib-schemas) (gtk-icon-themes, gtk-im-modules, linux-module-database) (xdg-desktop-database, xdg-mime-database, fonts-dir-file) (manual-database, manual-database/optional): Add optional #:system parameter and pass it to ‘gexp->derivation’. (profile-derivation): Pass HOOK a second parameter, SYSTEM. * gnu/bootloader.scm (efi-bootloader-profile)[efi-bootloader-profile-hook]: Add optional #:system parameter and pass it to ‘gexp->derivation’. * guix/channels.scm (package-cache-file): Likewise. * tests/profiles.scm ("profile-derivation, #:system, and hooks"): New test. Reported-by: Tobias Geerinckx-Rice --- gnu/bootloader.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/bootloader.scm') diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 2c36d8c6cf..ba06de7618 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 David Craven ;;; Copyright © 2017, 2020, 2022 Mathieu Othacehe ;;; Copyright © 2017 Leo Famulari -;;; Copyright © 2019, 2021 Ludovic Courtès +;;; Copyright © 2019, 2021, 2023 Ludovic Courtès ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2022 Josselin Poiret ;;; Copyright © 2022 Reza Alizadeh Majd @@ -335,7 +335,7 @@ FILES may contain file like objects produced by procedures like plain-file, local-file, etc., or package contents produced with file-append. HOOKS lists additional hook functions to modify the profile." - (define (efi-bootloader-profile-hook manifest) + (define* (efi-bootloader-profile-hook manifest #:optional system) (define build (with-imported-modules '((guix build utils)) #~(begin @@ -383,6 +383,7 @@ HOOKS lists additional hook functions to modify the profile." (gexp->derivation "efi-bootloader-profile" build + #:system system #:local-build? #t #:substitutable? #f #:properties -- cgit v1.2.3