all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33867: Folding with origin-uri fails for inherited packages
@ 2018-12-25 11:43 swedebugia
  2018-12-25 12:01 ` Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: swedebugia @ 2018-12-25 11:43 UTC (permalink / raw)
  To: 33867

Is this a bug?

scheme@(guix-user) [1]> (define snakes
                        (fold-packages
                             (lambda (package lst)
                                 (if (string-prefix? "python"
                                       (package-name package))
                                        (cons (origin-uri package) lst)
                              lst))
                         '()))
... ... ... ... ... ... ... <unnamed port>:15:45: In procedure 
origin-uri: Wrong type argument: #<package python2-defusedxml@0.5.0 
gnu/packages/xml.scm:1235 2220300>

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guix-user) [2]> ,bt
In current input:
     11:23  5 (_)
In guix/discovery.scm:
     155:3  4 (fold-module-public-variables _ _ _)
In guix/combinators.scm:
     45:26  3 (fold2 #<procedure 1138b20 at guix/discovery.scm:155:10 
(mod…> …)
     45:26  2 (fold2 #<procedure 1144620 at guix/discovery.scm:156:19 
(var…> …)
In guix/discovery.scm:
    158:33  1 (_ #<package python2-defusedxml@0.5.0 
gnu/packages/xml.scm:1…> …)
In current input:
     15:45  0 (_ _ _)


-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#33867: Folding with origin-uri fails for inherited packages
  2018-12-25 11:43 bug#33867: Folding with origin-uri fails for inherited packages swedebugia
@ 2018-12-25 12:01 ` Mathieu Othacehe
  2018-12-25 17:29   ` swedebugia
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2018-12-25 12:01 UTC (permalink / raw)
  To: swedebugia; +Cc: 33867


Hi,

> Is this a bug?

No it's not, the following snippet should work better.

--8<---------------cut here---------------start------------->8---
(fold-packages
 (lambda (package lst)
   (if (string-prefix? "python" (package-name package))
       (cons (and=> (package-source package)
                    (lambda (source)
                      (origin-uri source)))
             lst)
     lst))
 '())
--8<---------------cut here---------------end--------------->8---

Mathieu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#33867: Folding with origin-uri fails for inherited packages
  2018-12-25 12:01 ` Mathieu Othacehe
@ 2018-12-25 17:29   ` swedebugia
  0 siblings, 0 replies; 3+ messages in thread
From: swedebugia @ 2018-12-25 17:29 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 33867-done

On 2018-12-25 13:01, Mathieu Othacehe wrote:
> (fold-packages
>   (lambda (package lst)
>     (if (string-prefix? "python" (package-name package))
>         (cons (and=> (package-source package)
>                      (lambda (source)
>                        (origin-uri source)))
>               lst)
>       lst))
>   '())

thanks!
closing
-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-25 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-25 11:43 bug#33867: Folding with origin-uri fails for inherited packages swedebugia
2018-12-25 12:01 ` Mathieu Othacehe
2018-12-25 17:29   ` swedebugia

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.