From 3c656c4423a209d092734c3c1533c7aadefe37c2 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 29 Mar 2021 17:14:08 +0200 Subject: [PATCH 07/10] guix: build-system: qt: Support #:disallowed-references. * guix/build-system/qt.scm (qt-build): Support #:disallowed-references, using 'canonicalize-reference'. (qt-cross-build): Support #:disallowed-references, using 'canonicalize-cross-reference'. --- guix/build-system/qt.scm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 118022ec45..ad9309af11 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2019 Hartmut Goebel +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (ice-9 match) + #:use-module (srfi srfi-26) #:export (%qt-build-system-modules qt-build qt-build-system)) @@ -127,9 +129,13 @@ (system (%current-system)) (imported-modules %qt-build-system-modules) (modules '((guix build qt-build-system) - (guix build utils)))) + (guix build utils))) + disallowed-references) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." + (define specialized-canonicalize-reference + (cut canonicalize-reference store system <>)) + (define builder `(begin (use-modules ,@modules) @@ -175,6 +181,10 @@ provides a 'CMakeLists.txt' file as its build system." #:inputs inputs #:modules imported-modules #:outputs outputs + #:disallowed-references + (and disallowed-references + (map specialized-canonicalize-reference + disallowed-references)) #:guile-for-build guile-for-build)) @@ -209,10 +219,14 @@ provides a 'CMakeLists.txt' file as its build system." (build (nix-system->gnu-triplet system)) (imported-modules %qt-build-system-modules) (modules '((guix build qt-build-system) - (guix build utils)))) + (guix build utils))) + disallowed-references) "Cross-build NAME using CMAKE for TARGET, where TARGET is a GNU triplet and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." + (define specialized-canonicalize-reference + (cut canonicalize-cross-reference store target system <>)) + (define builder `(begin (use-modules ,@modules) @@ -284,6 +298,10 @@ build system." #:inputs (append native-drvs target-drvs) #:outputs outputs #:modules imported-modules + #:disallowed-references + (and disallowed-references + (map specialized-canonicalize-reference + disallowed-references)) #:guile-for-build guile-for-build)) (define qt-build-system -- 2.31.1