dart-source: don't clobber passthru elements
Without the change `passthru` override deleted `fetchGitHashesScript`
entry and caused updater scripts to fail:
```
$ nix-instantiate -A butterfly.updateScript
error:
… while evaluating the attribute 'command'
at pkgs/common-updater/combinators.nix:190:7:
189| {
190| command = commandsToShellInvocation (map ({ command, ... }: command) scripts);
| ^
191| supportedFeatures =
… while evaluating the attribute 'paths'
at pkgs/common-updater/combinators.nix:91:7:
90| commands = commands ++ [ new.args ];
91| paths = paths ++ new.paths;
| ^
92| maxArgIndex = new.maxArgIndex;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'fetchGitHashesScript' missing
at pkgs/by-name/bu/butterfly/package.nix:64:11:
63| command = [
64| dart.fetchGitHashesScript
| ^
65| "--input"
```
Let's use attribute merge instead.
This commit is contained in:
@@ -247,9 +247,11 @@ dart-bin.overrideAttrs (oldAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = writeShellScript "update-dart" ''
|
||||
${lib.getExe nix-update} --version=$(${lib.getExe curlMinimal} --fail --location --silent https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION | ${lib.getExe jq} --raw-output .version)
|
||||
'';
|
||||
passthru = oldAttrs.passthru // {
|
||||
updateScript = writeShellScript "update-dart" ''
|
||||
${lib.getExe nix-update} --version=$(${lib.getExe curlMinimal} --fail --location --silent https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION | ${lib.getExe jq} --raw-output .version)
|
||||
'';
|
||||
};
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
platforms = [
|
||||
|
||||
Reference in New Issue
Block a user