From 828b906bebabaca1de1cb114c0e51dade4dee8a1 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Fri, 1 May 2026 18:38:21 +0200 Subject: [PATCH] requireFile: set `unfree` license by default This avoids unfixable Hydra failures like https://hydra.nixos.org/build/327183659. --- doc/release-notes/rl-2611.section.md | 2 ++ pkgs/build-support/trivial-builders/default.nix | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/doc/release-notes/rl-2611.section.md b/doc/release-notes/rl-2611.section.md index 33805fc50055..7aa7fd8f5b6c 100644 --- a/doc/release-notes/rl-2611.section.md +++ b/doc/release-notes/rl-2611.section.md @@ -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} diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 2174846b986c..19c8248d3218 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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