apptainer, singularity: deprecate workarounds for vendorHash overriding (#352756)

This commit is contained in:
Yueh-Shun Li
2025-03-31 21:16:45 +08:00
committed by GitHub
2 changed files with 25 additions and 6 deletions
+4
View File
@@ -8,6 +8,10 @@
- `services.rippleDataApi` has been removed, as `ripple-data-api` was broken and had not been updated since 2022.
- `apptainer` and `singularity` deprecate the workaround of overriding `vendorHash` and related attributes via `<pkg>.override`,
in favour of the unified overriding of the same group of attributes via `<pkg>.overrideAttrs`.
The compatibility layer will be removed in future releases.
- `squid` has been updated to version 7, this release includes multiple breaking changes, like ESI removal.
For more information, [check the release notes](https://github.com/squid-cache/squid/releases/tag/SQUID_7_0_1).
@@ -16,7 +16,8 @@
let
# Backward compatibility layer for the obsolete workaround of
# the "vendor-related attributes not overridable" issue (#86349),
# whose solution is merged and released.
# whose solution (#225051) is merged and released.
# TODO(@ShamrockLee): Remove after the Nixpkgs 25.05 branch-off.
_defaultGoVendorArgs = {
inherit vendorHash deleteVendor proxyVendor;
};
@@ -96,14 +97,28 @@ in
# "path/to/source/file1" = [ "<originalDefaultPath11>" "<originalDefaultPath12>" ... ];
# }
sourceFilesWithDefaultPaths ? { },
# Workaround #86349
# should be removed when the issue is resolved
vendorHash ? _defaultGoVendorArgs.vendorHash,
deleteVendor ? _defaultGoVendorArgs.deleteVendor,
proxyVendor ? _defaultGoVendorArgs.proxyVendor,
# Placeholders for the obsolete workaround of #86349
# TODO(@ShamrockLee): Remove after the Nixpkgs 25.05 branch-off.
vendorHash ? null,
deleteVendor ? null,
proxyVendor ? null,
}@args:
let
# Backward compatibility layer for the obsolete workaround of #86349
# TODO(@ShamrockLee): Convert to simple inheritance after the Nixpkgs 25.05 branch-off.
moduleArgsOverridingCompat =
argName:
if args.${argName} or null == null then
_defaultGoVendorArgs.${argName}
else
lib.warn
"${projectName}: Override ${argName} with .override is deprecated. Use .overrideAttrs instead."
args.${argName};
vendorHash = moduleArgsOverridingCompat "vendorHash";
deleteVendor = moduleArgsOverridingCompat "deleteVendor";
proxyVendor = moduleArgsOverridingCompat "proxyVendor";
addShellDoubleQuotes = s: lib.escapeShellArg ''"'' + s + lib.escapeShellArg ''"'';
in
(buildGoModule {