ci: Restore license handling.
authorMathieu Othacehe <othacehe@gnu.org>
Mon, 2 Nov 2020 19:58:39 +0000 (20:58 +0100)
committerMathieu Othacehe <othacehe@gnu.org>
Mon, 2 Nov 2020 20:02:39 +0000 (21:02 +0100)
This is a follow-up of 7c02eb6c and 44daec7f. Restore the initial behaviour.

* gnu/ci.scm (package->alist): Restore license handling.

gnu/ci.scm

index 1d16805..bf9952a 100644 (file)
         (system . ,(derivation-system drv))
         (description . ,(package-synopsis package))
         (long-description . ,(package-description package))
-        (license . ,(and=> (package-license package) license-name))
+
+        ;; XXX: Hydra ignores licenses that are not a <license> structure or a
+        ;; list thereof.
+        (license . ,(let loop ((license (package-license package)))
+                      (match license
+                        ((? license?)
+                         (license-name license))
+                        ((lst ...)
+                         (map loop license)))))
+
         (home-page . ,(package-home-page package))
         (maintainers . ("bug-guix@gnu.org"))
         (max-silent-time . ,(or (assoc-ref (package-properties package)