all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen via Guix-patches via <guix-patches@gnu.org>
To: 49566@debbugs.gnu.org
Subject: [bug#49566] [PATCH core-updates 3/4] import: opam: Emit new-style package inputs.
Date: Wed, 14 Jul 2021 18:40:36 -0700	[thread overview]
Message-ID: <f908386616b4137f11f95fe120d2022aa5407397.1626311767.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <cover.1626311767.git.iskarian@mgsn.dev>

* guix/import/opam.scm (opam->guix-package): Wrap INPUTS and
NATIVE-INPUTS in 'list' instead of 'quasiquote'.
(dependency-list->inputs): Return a list of symbols.
* tests/opam.scm ("opam->guix-package"): Adjust accordingly.
---
 guix/import/opam.scm | 11 +++++------
 tests/opam.scm       | 10 +++-------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 0201376457..1ce8b7e94e 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -269,10 +270,8 @@ path to the repository."
     (map dependency->native-input depends)))
 
 (define (dependency-list->inputs lst)
-  (map
-    (lambda (dependency)
-      (list dependency (list 'unquote (string->symbol dependency))))
-    (ocaml-names->guix-names lst)))
+  (map string->symbol
+       (ocaml-names->guix-names lst)))
 
 (define* (opam-fetch name #:optional (repository (get-opam-repository)))
   (and-let* ((repository repository)
@@ -325,10 +324,10 @@ or #f on failure."
                                           'ocaml-build-system))
                        ,@(if (null? inputs)
                            '()
-                           `((propagated-inputs ,(list 'quasiquote inputs))))
+                           `((propagated-inputs (list ,@inputs))))
                        ,@(if (null? native-inputs)
                            '()
-                           `((native-inputs ,(list 'quasiquote native-inputs))))
+                           `((native-inputs (list ,@native-inputs))))
                        ,@(if (equal? name (guix-name->opam-name (ocaml-name->guix-name name)))
                            '()
                            `((properties
diff --git a/tests/opam.scm b/tests/opam.scm
index f1e3b70cb0..e7f1ff9e39 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -101,13 +102,8 @@ url {
                                ('base32
                                 (? string? hash)))))
                    ('build-system 'ocaml-build-system)
-                   ('propagated-inputs
-                    ('quasiquote
-                     (("ocaml-zarith" ('unquote 'ocaml-zarith)))))
-                   ('native-inputs
-                    ('quasiquote
-                     (("ocaml-alcotest" ('unquote 'ocaml-alcotest))
-                      ("ocamlbuild" ('unquote 'ocamlbuild)))))
+                   ('propagated-inputs ('list 'ocaml-zarith))
+                   ('native-inputs ('list 'ocaml-alcotest 'ocamlbuild))
                    ('home-page "https://example.org/")
                    ('synopsis "Some example package")
                    ('description "This package is just an example.")
-- 
2.31.1





  parent reply	other threads:[~2021-07-15  1:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  1:28 [bug#49566] [PATCH core-updates 0/4] import: {egg, gem, opam, hackage}: Emit new-style package inputs Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 1/4] import: egg: " Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 2/4] import: gem: " Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` Sarah Morgensen via Guix-patches via [this message]
2021-07-15  1:40 ` [bug#49566] [PATCH core-updates 4/4] import: hackage: " Sarah Morgensen via Guix-patches via
2021-07-20 21:34   ` bug#49566: [PATCH core-updates 0/4] import: {egg, gem, opam, hackage}: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f908386616b4137f11f95fe120d2022aa5407397.1626311767.git.iskarian@mgsn.dev \
    --to=guix-patches@gnu.org \
    --cc=49566@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.