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 4/4] import: hackage: Emit new-style package inputs.
Date: Wed, 14 Jul 2021 18:40:37 -0700	[thread overview]
Message-ID: <66fc4a13098b1d7658175e9b966f4f579ac55b15.1626311767.git.iskarian@mgsn.dev> (raw)
In-Reply-To: <cover.1626311767.git.iskarian@mgsn.dev>

* guix/import/hackage.scm (hackage-module->sexp)[dependencies]
[native-dependencies]: Make into a list of symbols.
[maybe-inputs]: Wrap INPUTS in 'list' instead of 'quasiquote'.
* tests/hackage.scm (match-ghc-foo)
(match-ghc-foo-6)
(match-ghc-foo-revision): Adjust accordingly.
---
 guix/import/hackage.scm | 11 +++++------
 tests/hackage.scm       | 18 +++++-------------
 2 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index f94a1e7087..7c6d9d0a22 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -265,14 +266,12 @@ the hash of the Cabal file."
      hackage-dependencies))
 
   (define dependencies
-    (map (lambda (name)
-           (list name (list 'unquote (string->symbol name))))
+    (map string->symbol
          (map hackage-name->package-name
               hackage-dependencies)))
 
   (define native-dependencies
-    (map (lambda (name)
-           (list name (list 'unquote (string->symbol name))))
+    (map string->symbol
          (map hackage-name->package-name
               hackage-native-dependencies)))
   
@@ -282,8 +281,8 @@ the hash of the Cabal file."
        '())
       ((inputs ...)
        (list (list input-type
-                   (list 'quasiquote inputs))))))
-  
+                   `(list ,@inputs))))))
+
   (define (maybe-arguments)
     (match (append (if (not include-test-dependencies?)
                        '(#:tests? #f)
diff --git a/tests/hackage.scm b/tests/hackage.scm
index 66a13d9881..0ecef40b55 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -178,9 +179,7 @@ library
         ('base32
          (? string? hash)))))
     ('build-system 'haskell-build-system)
-    ('inputs
-     ('quasiquote
-      (("ghc-http" ('unquote 'ghc-http)))))
+    ('inputs ('list 'ghc-http))
     ('home-page "http://test.org")
     ('synopsis (? string?))
     ('description (? string?))
@@ -223,13 +222,8 @@ library
         ('base32
          (? string? hash)))))
     ('build-system 'haskell-build-system)
-    ('inputs
-     ('quasiquote
-      (("ghc-b" ('unquote 'ghc-b))
-       ("ghc-http" ('unquote 'ghc-http)))))
-    ('native-inputs
-     ('quasiquote
-      (("ghc-haskell-gi" ('unquote 'ghc-haskell-gi)))))
+    ('inputs ('list 'ghc-b 'ghc-http))
+    ('native-inputs ('list 'ghc-haskell-gi))
     ('home-page "http://test.org")
     ('synopsis (? string?))
     ('description (? string?))
@@ -353,9 +347,7 @@ executable cabal
         ('base32
          (? string? hash)))))
     ('build-system 'haskell-build-system)
-    ('inputs
-     ('quasiquote
-      (("ghc-http" ('unquote 'ghc-http)))))
+    ('inputs ('list 'ghc-http))
     ('arguments
      ('quasiquote
       ('#:cabal-revision
-- 
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 ` [bug#49566] [PATCH core-updates 3/4] import: opam: " Sarah Morgensen via Guix-patches via
2021-07-15  1:40 ` Sarah Morgensen via Guix-patches via [this message]
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=66fc4a13098b1d7658175e9b966f4f579ac55b15.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.