GNU bug report logs - #42338
[PATCH] Add composer build system (PHP)

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Sun, 12 Jul 2020 22:22:02 UTC

Severity: normal

Tags: patch

Done: Steve George <steve <at> futurile.net>

Bug is archived. No further changes may be made.

Full log


Message #128 received at 42338 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 42338 <at> debbugs.gnu.org
Subject: Re: [bug#42338] [PATCH 01/34] guix: import: Add composer importer.
Date: Sat, 19 Sep 2020 01:20:55 +0200
[Message part 1 (text/plain, inline)]
Le Fri, 18 Sep 2020 10:31:39 +0200,
Ludovic Courtès <ludo <at> gnu.org> a écrit :

> Hi!
> 
> Julien Lepiller <julien <at> lepiller.eu> skribis:
> 
> > From 6d521ca9f066f82488abefd5d3630e38305c0fd1 Mon Sep 17 00:00:00
> > 2001 From: Julien Lepiller <julien <at> lepiller.eu>
> > Date: Tue, 29 Oct 2019 08:07:38 +0100
> > Subject: [PATCH 01/34] guix: import: Add composer importer.
> >
> > * guix/import/composer.scm: New file.
> > * guix/scripts/import/composer.scm: New file.
> > * guix/tests/composer.scm: New file.
> > * Makefile.am: Add them.
> > * guix/scripts/import.scm: Add composer importer.
> > * doc/guix.texi (Invoking guix import): Mention it.  
> 
> [...]
> 
> > +@item composer
> > +@cindex COMPOSER  
> 
> s/COMPOSER/Composer/ ?
> 
> > +Import metadat from the @uref{https://getcomposer.org/, Composer}
> > package  
>                 ^
> metadata
> 
> > +archive used by the PHP community.  
> 
> Could you add an example command line like we have for some of the
> other importers?  (It’s also useful for us as a test against the
> actual servers…)
> 
> > +  (let ((package (json-fetch
> > +                   (string-append (%composer-base-url) "/p/" name
> > ".json"))))
> > +    (if package
> > +        (let* ((packages (assoc-ref package "packages"))
> > +               (package (assoc-ref packages name))
> > +               (versions (filter
> > +                           (lambda (version)
> > +                             (and (not (string-contains version
> > "dev"))
> > +                                  (not (string-contains version
> > "beta"))))
> > +                           (map car package)))  
> 
> Like I wrote before, I recommend ‘define-json-mapping’.  If you prefer
> you can make that change later on once you’ve pushed this first
> version, but I really think it’ll help maintainability.
> 
> This should also help avoid (map car …), which is frowned upon in
> Guix. :-)
> 
> > +               (versions (map
> > +                           (lambda (version)  
> 
> Rather indent as: (map (lambda (version)
> 
> Otherwise LGTM!  
> 
> Ludo’.

Thanks, here's a new version
[0001-guix-import-Add-composer-importer.patch (text/x-patch, attachment)]

This bug report was last modified 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.