summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-09-30 22:38:57 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-02 17:04:50 +0200
commit46d15af4cb913d135c6e16c8cb713058aa9e2691 (patch)
tree11dfbf555528a4226623305130051c5722a3c005 /tests
parent21aeb62437ebb92eff55521707295f25a65a2f44 (diff)
downloadguix-46d15af4cb913d135c6e16c8cb713058aa9e2691.tar.gz
import: stackage: Use 'define-json-mapping'.
* guix/import/stackage.scm (<stackage-lts>, <snapshot>)
(<stackage-package>): New record types and JSON mappings.
(lts-info-packages, stackage-package-name)
(stackage-package-version): Remove.
(lts-package-version): Rename 'pkgs-info' to 'packages'; assume
'packages' is a list of <stackage-package>.
(stackage->guix-package): Use 'stackage-lts-packages' instead of
'lts-info-packages'.  Rename 'packages-info' to 'packages'.
(latest-lts-release): Likewise.
(stackage-package?): Rename to...
(stackage-lts-package?): ... this.  Adjust to new API.
(%stackage-updater)[pred]: Update accordingly.
* tests/lint.scm ("haskell-stackage"): Add "snapshot" entry in JSON
snippet.
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index e96265a55a..699a750eb9 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -1319,7 +1319,11 @@
   (let* ((stackage (string-append "{ \"packages\": [{"
                                   "    \"name\":\"pandoc\","
                                   "    \"synopsis\":\"synopsis\","
-                                  "    \"version\":\"1.0\" }]}"))
+                                  "    \"version\":\"1.0\" }],"
+                                  "  \"snapshot\": {"
+                                  "    \"ghc\": \"8.6.5\","
+                                  "    \"name\": \"lts-14.27\""
+                                  "  }}"))
          (packages (map (lambda (version)
                           (dummy-package
                            "ghc-pandoc"