GNU bug report logs - #68935
[PATCH 0/3] Add 'put' option to guix import.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Mon, 5 Feb 2024 14:52:02 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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Herman Rimm <herman <at> rimm.ee>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>, 68935 <at> debbugs.gnu.org, Christopher Baines <guix <at> cbaines.net>
Subject: [bug#68935] [PATCH 2/3] guix: import: Wrap package expressions with define-public.
Date: Wed, 07 Feb 2024 22:38:52 +0100
Herman Rimm <herman <at> rimm.ee> skribis:

> * guix/scripts/import.scm (guix-import): Wrap package expressions.
>
> Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687

Probably a good idea!

>             (match (apply (resolve-importer importer) args)
> -             ((and expr (or ('package _ ...)
> -                            ('let _ ...)
> +             ((and expr ('package _ ...))
> +              (print (package->definition expr)))
> +             ((and expr (or ('let _ ...)
>                              ('define-public _ ...)))
>                (print expr))

The (let …) case should be treated like the (package …) case.  It
corresponds to things like:

  (let ((commit "abcde"))
    (package
      …))

> +                  (match expr
> +                         ((and expr ('package _ ...))
> +                          (print (package->definition expr)))
> +                         ((and expr (or ('let _ ...)
> +                                        ('define-public _ ...)))
> +                          (print expr)))

Same here.

Also, please indent ‘match’ the same way as elsewhere in the code:

  (match lst
    ((x y z)
     …))

Ludo’.




This bug report was last modified 1 year and 88 days ago.

Previous Next


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