[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49025] [PATCH core-updates 00/37] Support cross-compilation with me
From: |
Maxime Devos |
Subject: |
[bug#49025] [PATCH core-updates 00/37] Support cross-compilation with meson |
Date: |
Mon, 19 Jul 2021 11:40:41 +0200 |
User-agent: |
Evolution 3.34.2 |
Ludovic Courtès schreef op zo 18-07-2021 om 19:42 [+0200]:
> As discussed some time ago on IRC, I think it would be good to
> homogenize this with ‘lookup-package-input’ and related procedures
> introduced in ba32f6363878165b3ca53113f6c95b8677b8537b (we both had the
> same idea :-)).
>
> What about keeping the ‘this-’ macros above, rewriting them in terms of
> ‘lookup-’, and removing ‘package-input’ and ‘package-native-input’?
I've written a patch (see attachement) to do this.
Greetings,
MMaxime.
From f9803aa77f348214b6295d363585282a2b2f35e6 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 19 Jul 2021 11:08:40 +0200
Subject: [PATCH] packages: Use 'lookup-package-input' and friends instead of
'package-input'.
* guix/packages.scm
(package-input, package-native-input): Remove.
(this-package-input): Use 'lookup-package-input' and
'lookup-package-propagated-input' instead of 'package-input'.
(this-package-native-input): Use 'lookup-package-native-input'
instead of 'package-input'.
---
guix/packages.scm | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index d3fa72fd09..2349bb4340 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -550,32 +550,18 @@ object."
#f)))
(_ #f)))
-(define (package-input package name)
- "Return the package input NAME of PACKAGE--i.e., an input
-from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not
-considered. If this input does not exist, return #f instead."
- (and=> (or (assoc-ref (package-inputs package) name)
- (assoc-ref (package-propagated-inputs package) name))
- car))
-
-(define (package-native-input package name)
- "Return the native package input NAME of PACKAGE--i.e., an input
-from the ‘native-inputs’ field. If this native input does not exist,
-return #f instead."
- (and=> (assoc-ref (package-native-inputs package) name)
- car))
-
(define-syntax-rule (this-package-input name)
"Return the input NAME of the package being defined--i.e., an input
from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not
considered. If this input does not exist, return #f instead."
- (package-input this-package name))
+ (or (lookup-package-input this-package name)
+ (lookup-package-propagated-input this-package name)))
(define-syntax-rule (this-package-native-input name)
"Return the native package input NAME of the package being defined--i.e.,
an input from the ‘native-inputs’ field. If this native input does not
exist, return #f instead."
- (package-native-input this-package name))
+ (lookup-package-native-input this-package name))
;; Error conditions.
--
2.32.0
signature.asc
Description: This is a digitally signed message part
- [bug#49025] [PATCH v6 00/22] Support cross-compilation with meson, Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 08/22] libgpg-error: Remove trailing #f from phases., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 10/22] libgpg-error: Fix cross-compilation error., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 12/22] openssl: Remove trailing #t from phases., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 19/22] glib: Verify the cross-compiled python is used in installed scripts., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 01/22] utils: Define 'target-linux?' predicate., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 04/22] utils: Define a target-x86-32? and target-x86-64? predicate., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 11/22] python: Fix reference to input when cross-compiling., Maxime Devos, 2021/07/14
- [bug#49025] [PATCH v6 18/22] glib: Use a correct python in scripts when cross-compiling., Maxime Devos, 2021/07/14