fix: package license causing hydra eval fails (#30)
Difference in license attrset schema between lib and tidepool caused eval fails, as in [here](https://hydra.aux-cache.dev/jobset/aux/tidepool#tabs-errors). This PR changes tidepool's scheme to align it with lib: ```console ❯ nix eval -f tidepool packages.foundation.bash.latest.meta.license --json | jq { "free": true, "fullName": "GNU General Public License v3.0 or later", "name": "gpl3Plus", "redistributable": true, "spdxId": "GPL-3.0-or-later", "url": "https://spdx.org/licenses/GPL-3.0-or-later.html" } ``` I kinda liked the previous schema of tidepool, but it's a lower impact fix than bumping lib's major, and I think we want to think more about licenses in lib (e.g. it would probably make sense to move tidepool's license type there to avoid dupplicating the code for the default behavior). Co-authored-by: austreelis <git@swhaele.net> Reviewed-on: #30 Reviewed-by: vlinkz <vlinkz@snowflakeos.org> Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org> Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
This commit is contained in:
parent
9477da5166
commit
8ffc63ae42
1 changed files with 14 additions and 11 deletions
|
|
@ -13,19 +13,18 @@ in
|
|||
{ config }:
|
||||
{
|
||||
options = {
|
||||
name = {
|
||||
full = lib.options.create {
|
||||
description = "The full name of the license.";
|
||||
type = lib.types.string;
|
||||
};
|
||||
|
||||
short = lib.options.create {
|
||||
description = "The short name of the license.";
|
||||
type = lib.types.string;
|
||||
};
|
||||
name = lib.options.create {
|
||||
description = "The short name of the license.";
|
||||
type = lib.types.string;
|
||||
};
|
||||
|
||||
spdx = lib.options.create {
|
||||
fullName = lib.options.create {
|
||||
description = "The full name of the license.";
|
||||
type = lib.types.string;
|
||||
};
|
||||
|
||||
spdxId = lib.options.create {
|
||||
description = "The SPDX identifier for the license.";
|
||||
type = lib.types.nullish lib.types.string;
|
||||
default.value = null;
|
||||
|
|
@ -33,7 +32,11 @@ in
|
|||
|
||||
url = lib.options.create {
|
||||
description = "The URL for the license.";
|
||||
type = lib.types.nullish lib.types.string;
|
||||
type = lib.types.string;
|
||||
default = {
|
||||
text = "spdx.org entry, if `spdxId` is set, `null` otherwise";
|
||||
value = if config.spdxId == null then null else "https://spdx.org/licenses/${config.spdxId}.html";
|
||||
};
|
||||
};
|
||||
|
||||
free = lib.options.create {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue