Ludovic Courtès b6bc4c109b
packages: Raise an exception for invalid 'license' values.
This is written in such a way that the type check turns into a no-op at
macro-expansion time for trivial cases:

  > ,optimize (validate-license gpl3+)
  $18 = gpl3+
  > ,optimize (validate-license (list gpl3+ gpl2+))
  $19 = (list gpl3+ gpl2+)

* guix/packages.scm (valid-license-value?, validate-license): New
macros.
(<package>)[license]: Add 'sanitize' option.
(&package-license-error): New error condition type.
* tests/packages.scm ("license type checking"): New test.
2022-10-10 11:16:07 +02:00
..
2021-09-17 01:27:40 +02:00
2020-12-21 17:47:35 +01:00
2022-05-22 01:07:52 +02:00
2022-05-25 09:28:43 +02:00
2022-02-14 11:23:07 +01:00
2020-12-09 22:25:17 +01:00
2021-09-28 22:00:47 +02:00
2022-05-25 09:28:43 +02:00
2022-06-15 10:18:34 +02:00
2021-04-12 18:42:22 +02:00
2021-12-23 10:54:00 +01:00
2022-07-10 23:57:14 +02:00
2022-09-29 22:59:48 +02:00
2022-07-01 12:10:29 +02:00