requireFile: set unfree license by default (#515536)

This commit is contained in:
Philip Taron
2026-05-28 00:06:54 +00:00
committed by GitHub
4 changed files with 13 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

@@ -157,6 +157,8 @@ The list of Nix platform types for which the [Hydra](https://github.com/nixos/hy
}
```
Note that this does not affect whether reverse dependencies of the package are built on Hydra.
### `broken` {#var-meta-broken}
If set to `true`, the package is marked as "broken", meaning that it wont show up in [search.nixos.org](https://search.nixos.org/packages), and cannot be built or installed unless [explicitly allowed](#sec-allow-broken).

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

View File

@@ -34,6 +34,10 @@ python3Packages.buildPythonApplication rec {
name = "rcu-${version}-source.tar.gz";
hash = "sha256-9YhhsLqAcevjJmENWVWfA1ursPz3mgFz8mzLLSNlXVM=";
url = "https://www.davisr.me/projects/rcu/";
meta = {
# `requireFile` sets `lib.licenses.unfree` by default
inherit (meta) license;
};
};
in
runCommand "${src-tarball.name}-unpacked" { } ''