|
16 | 16 | let |
17 | 17 | # Backward compatibility layer for the obsolete workaround of |
18 | 18 | # 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. |
20 | 21 | _defaultGoVendorArgs = { |
21 | 22 | inherit vendorHash deleteVendor proxyVendor; |
22 | 23 | }; |
|
96 | 97 | # "path/to/source/file1" = [ "<originalDefaultPath11>" "<originalDefaultPath12>" ... ]; |
97 | 98 | # } |
98 | 99 | 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, |
104 | 105 | }@args: |
105 | 106 |
|
106 | 107 | 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 | + |
107 | 122 | addShellDoubleQuotes = s: lib.escapeShellArg ''"'' + s + lib.escapeShellArg ''"''; |
108 | 123 | in |
109 | 124 | (buildGoModule { |
|
0 commit comments