Skip to content

Commit 016a24e

Browse files
committed
apptainer, singularity: deprecate workarounds for vendorHash overriding
Remove obsolete overriding workarounds for vendorHash, deleteVendor and proxyVendor (through the <pkg>.override interface). The workaround functionality has been fixed by commit eed069a ("buildGoModule: fix overrideAttrs overriding"), and these arguments can now be overridden using <pkg>.overrideAttrs.
1 parent 11e4741 commit 016a24e

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

doc/release-notes/rl-2505.section.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
- `services.rippleDataApi` has been removed, as `ripple-data-api` was broken and had not been updated since 2022.
1010

11+
- `apptainer` and `singularity` deprecate the workaround of overriding `vendorHash` and related attributes via `<pkg>.override`,
12+
in favour of the unified overriding of the same group of attributes via `<pkg>.overrideAttrs`.
13+
The compatibility layer will be removed in future releases.
14+
1115
- `squid` has been updated to version 7, this release includes multiple breaking changes, like ESI removal.
1216
For more information, [check the release notes](https://github.com/squid-cache/squid/releases/tag/SQUID_7_0_1).
1317

pkgs/applications/virtualization/singularity/generic.nix

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
let
1717
# Backward compatibility layer for the obsolete workaround of
1818
# the "vendor-related attributes not overridable" issue (#86349),
19-
# whose solution is merged and released.
19+
# whose solution (#225051) is merged and released.
20+
# TODO(@ShamrockLee): Remove after the Nixpkgs 25.05 branch-off.
2021
_defaultGoVendorArgs = {
2122
inherit vendorHash deleteVendor proxyVendor;
2223
};
@@ -96,14 +97,28 @@ in
9697
# "path/to/source/file1" = [ "<originalDefaultPath11>" "<originalDefaultPath12>" ... ];
9798
# }
9899
sourceFilesWithDefaultPaths ? { },
99-
# Workaround #86349
100-
# should be removed when the issue is resolved
101-
vendorHash ? _defaultGoVendorArgs.vendorHash,
102-
deleteVendor ? _defaultGoVendorArgs.deleteVendor,
103-
proxyVendor ? _defaultGoVendorArgs.proxyVendor,
100+
# Placeholders for the obsolete workaround of #86349
101+
# TODO(@ShamrockLee): Remove after the Nixpkgs 25.05 branch-off.
102+
vendorHash ? null,
103+
deleteVendor ? null,
104+
proxyVendor ? null,
104105
}@args:
105106

106107
let
108+
# Backward compatibility layer for the obsolete workaround of #86349
109+
# TODO(@ShamrockLee): Convert to simple inheritance after the Nixpkgs 25.05 branch-off.
110+
moduleArgsOverridingCompat =
111+
argName:
112+
if args.${argName} or null == null then
113+
_defaultGoVendorArgs.${argName}
114+
else
115+
lib.warn
116+
"${projectName}: Override ${argName} with .override is deprecated. Use .overrideAttrs instead."
117+
args.${argName};
118+
vendorHash = moduleArgsOverridingCompat "vendorHash";
119+
deleteVendor = moduleArgsOverridingCompat "deleteVendor";
120+
proxyVendor = moduleArgsOverridingCompat "proxyVendor";
121+
107122
addShellDoubleQuotes = s: lib.escapeShellArg ''"'' + s + lib.escapeShellArg ''"'';
108123
in
109124
(buildGoModule {

0 commit comments

Comments
 (0)