* bug#21399: Emacs: Guix Package Info omits some inputs @ 2015-09-02 13:06 Ludovic Courtès 2015-09-02 15:20 ` Alex Kost 0 siblings, 1 reply; 5+ messages in thread From: Ludovic Courtès @ 2015-09-02 13:06 UTC (permalink / raw) To: 21399; +Cc: Alex Kost Hello, For ‘r’, the *Guix Package Info* buffer omits IcedTea from the set of inputs. It shows this: --8<---------------cut here---------------start------------->8--- Inputs : openblas-0.2.14, cairo-1.14.2, gfortran-4.9.3, icu4c-55.1, lapack-3.5.0, libjpeg-9a, libpng-1.5.21, libtiff-4.0.3, libxt-1.1.4, pcre-8.37, readline-6.3, zlib-1.2.7 --8<---------------cut here---------------end--------------->8--- whereas the recipe has this: --8<---------------cut here---------------start------------->8--- (inputs `(("openblas" ,openblas) ("cairo" ,cairo) ("gfortran" ,gfortran) ("icu4c" ,icu4c) ("icedtea6" ,icedtea6 "jdk") ("lapack" ,lapack) ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libxt" ,libxt) ("pcre" ,pcre) ("readline" ,readline) ("zlib" ,zlib))) --8<---------------cut here---------------end--------------->8--- My guess is that somewhere, the triplet for IcedTea is silently filtered out. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#21399: Emacs: Guix Package Info omits some inputs 2015-09-02 13:06 bug#21399: Emacs: Guix Package Info omits some inputs Ludovic Courtès @ 2015-09-02 15:20 ` Alex Kost 2015-09-03 14:41 ` Ludovic Courtès 0 siblings, 1 reply; 5+ messages in thread From: Alex Kost @ 2015-09-02 15:20 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 21399 [-- Attachment #1: Type: text/plain, Size: 1079 bytes --] Ludovic Courtès (2015-09-02 16:06 +0300) wrote: > Hello, > > For ‘r’, the *Guix Package Info* buffer omits IcedTea from the set of > inputs. It shows this: > > > Inputs : openblas-0.2.14, cairo-1.14.2, gfortran-4.9.3, icu4c-55.1, > lapack-3.5.0, libjpeg-9a, libpng-1.5.21, libtiff-4.0.3, > libxt-1.1.4, pcre-8.37, readline-6.3, zlib-1.2.7 > > whereas the recipe has this: > > > (inputs > `(("openblas" ,openblas) > ("cairo" ,cairo) > ("gfortran" ,gfortran) > ("icu4c" ,icu4c) > ("icedtea6" ,icedtea6 "jdk") > ("lapack" ,lapack) > ("libjpeg" ,libjpeg) > ("libpng" ,libpng) > ("libtiff" ,libtiff) > ("libxt" ,libxt) > ("pcre" ,pcre) > ("readline" ,readline) > ("zlib" ,zlib))) > > My guess is that somewhere, the triplet for IcedTea is silently filtered > out. Yes, you are right, it is filtered in ‘package-inputs-names’ in "emacs/guix-main.scm". The easiest fix would be the following [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: inputs.diff --] [-- Type: text/x-patch, Size: 488 bytes --] diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 8d3a881..636d524 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -245,7 +245,7 @@ Example: (define (package-inputs-names inputs) "Return a list of full names of the packages from package INPUTS." (filter-map (match-lambda - ((_ (? package? package)) + ((_ (? package? package) _ ...) (package-full-name package)) (_ #f)) inputs)) [-- Attachment #3: Type: text/plain, Size: 312 bytes --] However, I think it would be better to have "icedtea6-1.13.7:jdk" instead of "icedtea6-1.13.7" in the "Inputs". This requires modifying ‘full-name->name+version’ procedure so that pressing such "<name>-<version>:<out>" buttons will also work. Thank you for noticing this. The patch is attached. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #4: 0001-emacs-Add-support-for-triplet-package-inputs.patch --] [-- Type: text/x-patch, Size: 1679 bytes --] From ae9203234d5254a9cb6a8127d31e99289c605f7a Mon Sep 17 00:00:00 2001 From: Alex Kost <alezost@gmail.com> Date: Wed, 2 Sep 2015 17:57:58 +0300 Subject: [PATCH] emacs: Add support for "triplet" package inputs. Fixes <http://bugs.gnu.org/21399>. * emacs/guix-main.scm (full-name->name+version): Adjust to handle "name-version:output" string. (package-inputs-names): Support ("name" package "output") inputs. --- emacs/guix-main.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 8d3a881..623da88 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -71,7 +71,14 @@ (define (list-maybe obj) (if (list? obj) obj (list obj))) -(define full-name->name+version package-name->name+version) +(define (full-name->name+version spec) + "Given package specification SPEC with or without output, +return two values: name and version. For example, for SPEC +\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"." + (let-values (((name version output) + (package-specification->name+version+output spec))) + (values name version))) + (define (name+version->full-name name version) (string-append name "-" version)) @@ -247,6 +254,10 @@ Example: (filter-map (match-lambda ((_ (? package? package)) (package-full-name package)) + ((_ (? package? package) output) + (make-package-specification (package-name package) + (package-version package) + output)) (_ #f)) inputs)) -- 2.4.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#21399: Emacs: Guix Package Info omits some inputs 2015-09-02 15:20 ` Alex Kost @ 2015-09-03 14:41 ` Ludovic Courtès 2015-09-04 13:14 ` Alex Kost 0 siblings, 1 reply; 5+ messages in thread From: Ludovic Courtès @ 2015-09-03 14:41 UTC (permalink / raw) To: Alex Kost; +Cc: 21399 Alex Kost <alezost@gmail.com> skribis: > Yes, you are right, it is filtered in ‘package-inputs-names’ in > "emacs/guix-main.scm". The easiest fix would be the following > > diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm > index 8d3a881..636d524 100644 > --- a/emacs/guix-main.scm > +++ b/emacs/guix-main.scm > @@ -245,7 +245,7 @@ Example: > (define (package-inputs-names inputs) > "Return a list of full names of the packages from package INPUTS." > (filter-map (match-lambda > - ((_ (? package? package)) > + ((_ (? package? package) _ ...) > (package-full-name package)) > (_ #f)) > inputs)) > > However, I think it would be better to have "icedtea6-1.13.7:jdk" > instead of "icedtea6-1.13.7" in the "Inputs". This requires modifying > ‘full-name->name+version’ procedure so that pressing such > "<name>-<version>:<out>" buttons will also work. Right, makes sense. > From ae9203234d5254a9cb6a8127d31e99289c605f7a Mon Sep 17 00:00:00 2001 > From: Alex Kost <alezost@gmail.com> > Date: Wed, 2 Sep 2015 17:57:58 +0300 > Subject: [PATCH] emacs: Add support for "triplet" package inputs. > > Fixes <http://bugs.gnu.org/21399>. > > * emacs/guix-main.scm (full-name->name+version): Adjust to handle > "name-version:output" string. > (package-inputs-names): Support ("name" package "output") inputs. LGTM, thanks for the quick fix! Ludo’. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#21399: Emacs: Guix Package Info omits some inputs 2015-09-03 14:41 ` Ludovic Courtès @ 2015-09-04 13:14 ` Alex Kost 2015-09-04 14:11 ` Ludovic Courtès 0 siblings, 1 reply; 5+ messages in thread From: Alex Kost @ 2015-09-04 13:14 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 21399 Ludovic Courtès (2015-09-03 17:41 +0300) wrote: >> From ae9203234d5254a9cb6a8127d31e99289c605f7a Mon Sep 17 00:00:00 2001 >> From: Alex Kost <alezost@gmail.com> >> Date: Wed, 2 Sep 2015 17:57:58 +0300 >> Subject: [PATCH] emacs: Add support for "triplet" package inputs. >> >> Fixes <http://bugs.gnu.org/21399>. >> >> * emacs/guix-main.scm (full-name->name+version): Adjust to handle >> "name-version:output" string. >> (package-inputs-names): Support ("name" package "output") inputs. > > LGTM, thanks for the quick fix! The commit pushed, thank you. So I think this bug may be closed. -- Alex ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#21399: Emacs: Guix Package Info omits some inputs 2015-09-04 13:14 ` Alex Kost @ 2015-09-04 14:11 ` Ludovic Courtès 0 siblings, 0 replies; 5+ messages in thread From: Ludovic Courtès @ 2015-09-04 14:11 UTC (permalink / raw) To: Alex Kost; +Cc: 21399-done Alex Kost <alezost@gmail.com> skribis: > Ludovic Courtès (2015-09-03 17:41 +0300) wrote: > >>> From ae9203234d5254a9cb6a8127d31e99289c605f7a Mon Sep 17 00:00:00 2001 >>> From: Alex Kost <alezost@gmail.com> >>> Date: Wed, 2 Sep 2015 17:57:58 +0300 >>> Subject: [PATCH] emacs: Add support for "triplet" package inputs. >>> >>> Fixes <http://bugs.gnu.org/21399>. >>> >>> * emacs/guix-main.scm (full-name->name+version): Adjust to handle >>> "name-version:output" string. >>> (package-inputs-names): Support ("name" package "output") inputs. >> >> LGTM, thanks for the quick fix! > > The commit pushed, thank you. So I think this bug may be closed. Yep, thanks. Ludo’. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-04 14:12 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-02 13:06 bug#21399: Emacs: Guix Package Info omits some inputs Ludovic Courtès 2015-09-02 15:20 ` Alex Kost 2015-09-03 14:41 ` Ludovic Courtès 2015-09-04 13:14 ` Alex Kost 2015-09-04 14:11 ` Ludovic Courtès
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.