Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkgs/build-support/fetchurl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ lib.extendMkDerivation {
in

derivationArgs
# Compatibility layer for empty-string pname/version exclusion for Nixpkgs 25.11.
// lib.optionalAttrs (!(lib.oldestSupportedReleaseIsAtLeast 2511)) (
lib.optionalAttrs (pname == "") { pname = null; }
// lib.optionalAttrs (version == "") { version = null; }
)
Comment on lines +241 to +244
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this is saying is that:

  • if lib.trivial.release is 25.05 or older, then add no attrs
  • if lib.trivial.release is 25.11 or newer, then:
    • if pname is the empty string, set pname to null
    • if version is the empty string, set version to null

As I read it, this becomes a permanent addition, rather than something that disappears once we're past 2505.

Copy link
Contributor Author

@ShamrockLee ShamrockLee Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't !(lib.oldestSupportedReleaseIsAtLeast 2511) false on 26.05 and true on 25.11 and 25.05?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix-repl> lib = import ./lib

nix-repl> lib2511 = lib.extend (self: super: { trivial = super.trivial // { oldestSupportedRelease = 2511; }; })

nix-repl> lib2605 = lib.extend (self: super: { trivial = super.trivial // { oldestSupportedRelease = 2605; }; })

nix-repl> !(lib.oldestSupportedReleaseIsAtLeast 2511)
true

nix-repl> !(lib2511.oldestSupportedReleaseIsAtLeast 2511)
false

nix-repl> !(lib2605.oldestSupportedReleaseIsAtLeast 2511)
false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, the current lib will go to the release-25.11 release branch, lib2511 will be what is on release-26.05, and lib2605 on release-26.11. Is that right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding:

  • lib will be in master until ~Jan 2026, and will be in release-25.11 for its lifetime
  • lib2511 is what will be on master starting ~Jan 2026 through til ~July 2026, and will be in release-26.05 for its lifetime.
  • lib2605 is what will be on master starting ~Jul 2026, and will be in release-26.11 for its lifetime.

So yes, but also consider the master branch as well.

// {
name =
if finalAttrs.pname or null != null && finalAttrs.version or null != null then
Expand Down
Loading