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
..
2022-09-26 23:29:37 +02:00
2022-10-04 16:46:33 +04:00
2022-08-09 15:58:14 +02:00
2022-02-14 11:23:07 +01:00
2022-03-18 16:03:33 +01:00
2022-06-10 23:52:34 -04:00
2022-07-10 23:57:14 +02:00
2022-09-24 17:59:04 +02:00
2022-02-14 11:23:07 +01:00
2022-08-16 21:25:25 +02:00
2022-08-05 00:14:30 +02:00