GNU bug report logs -
#49169
[PATCH 00/11] Removing input labels from package definitions
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Tue, 22 Jun 2021 09:03:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello :)
This is a wonderful direction! I am always happy to see boilerplate
evaporate.
Ludovic Courtès <ludo <at> gnu.org> writes:
> • I changed a few importers to emit simplified package inputs.
> We’ll have to take care of the other importers eventually.
I found one more easy change to make in the importers. I just gave it a
quick smoke test with the Go importer, nothing exhaustive; and I'm not
sure which other importers use it. I've attached the patch below.
> doc/guix.texi | 208 ++++++++++++++--
In the manual, you added:
> Each element of these lists is either a package, origin, or other
> ``file-like object'' [...]
How should a file input like this be handled?
("some.patch" (search-patch "some.patch"))
If I had to guess, I'd try some gexp like...
#$(local-file (search-patch "some.patch"))
But I really have no idea!
> guix/scripts/style.scm | 527 +++++++++++++++++++++++++++++++++++++++++
> tests/style.scm | 366 ++++++++++++++++++++++++++++
> 23 files changed, 1643 insertions(+), 298 deletions(-)
The style script makes up fully half of the patch! Wow.
--
Sarah
[emit-new-package-inputs-elsewhere.patch (text/x-patch, inline)]
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index d817318a91..5075e5c491 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -237,12 +237,10 @@ into a proper sentence and by using two spaces between sentences."
optional OUTPUT, tries to generate a quoted list of inputs, as suitable to
use in an 'inputs' field of a package definition."
(define (make-input input version)
- (cons* input (list 'unquote (string->symbol
- (if version
- (string-append input "-" version)
- input)))
- (or (and output (list output))
- '())))
+ (let ((name (if version (string-append input "-" version) input)))
+ (if output
+ (list (string->symbol name) output)
+ (string->symbol name))))
(map (match-lambda
((input version) (make-input input version))
@@ -263,7 +261,7 @@ snippet generated is for regular inputs."
(()
'())
((package-inputs ...)
- `((,field-name (,'quasiquote ,package-inputs)))))))
+ `((,field-name (list ,@package-inputs)))))))
(define* (maybe-native-inputs package-names #:optional (output #f))
"Same as MAYBE-INPUTS, but for native inputs."
This bug report was last modified 3 years and 352 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.