guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: import: opam: Emit new-style package inputs.


From: guix-commits
Subject: 03/05: import: opam: Emit new-style package inputs.
Date: Tue, 20 Jul 2021 17:44:06 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 3d5a36c45755d8ca2b5978eb3769cba4809a68f1
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Wed Jul 14 18:40:36 2021 -0700

    import: opam: Emit new-style package inputs.
    
    * 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.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 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 a35b01d..c42b608 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 f1e3b70..e7f1ff9 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.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]