requireFile: set unfree license by default

This avoids unfixable Hydra failures like
https://hydra.nixos.org/build/327183659.
This commit is contained in:
Tom Hunze
2026-05-01 18:38:21 +02:00
parent 173e1366fc
commit 828b906beb
2 changed files with 7 additions and 0 deletions

View File

@@ -13,6 +13,8 @@
- `hurl` has been updated to `8.x.x` which has some breaking changes. See [upstream changelog](https://github.com/Orange-OpenSource/hurl/releases/tag/8.0.0) for details.
- `python3Packages.django-health-check` has been updated to major version 4. See its [migration guide](https://codingjoe.dev/django-health-check/migrate-to-v4/) and [changelog](https://github.com/codingjoe/django-health-check/releases/tag/4.0.0) for breaking changes.
- `requireFile` now sets `meta.license = lib.licenses.unfree` by default. Users of `requireFile`-based derivations that preserve this default will need to explicitly allow their evaluation as described in [](#sec-allow-unfree).
## Other Notable Changes {#sec-nixpkgs-release-26.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@@ -908,6 +908,7 @@ rec {
url ? null,
message ? null,
hashMode ? "flat",
meta ? { },
}@args:
assert (message != null) || (url != null);
assert (sha256 != null) || (sha1 != null) || (hash != null);
@@ -951,6 +952,10 @@ rec {
printf '%s' ${lib.escapeShellArg msg}
exit 1
'';
meta = {
license = lib.licenses.unfree;
}
// meta;
}
// (lib.optionalAttrs (name == null) {
# The case of providing `url`, but not `name`. This has