Commit 26b6ef9
committed
handy: add passthru.updateScript with custom per-platform refresh
`nix-update-script` alone cannot keep the per-platform
`frontendDepsHashes` table in sync: it can refresh the entry for the
current host via `--subpackage frontendDeps`, but it does not reset
the other platforms' entries, so after a version bump the stale
hashes from the previous release stay in place and eventually pass
a hash check on any host that just rebuilds without running the
script. The custom update script at
`pkgs/by-name/ha/handy/update.sh` plugs that gap:
1. `nix-update handy` bumps `version`, `src.hash`, `cargoHash`.
2. On a version change, every `frontendDepsHashes` entry is reset
to `lib.fakeHash` so the package throws on any host until a
fresh hash is computed there.
3. `handy.passthru.frontendDeps` is rebuilt on the current host,
the "got:" line is parsed, and the matching entry is written
back with the real value.
Running the script on each target host (or via remote builders)
refreshes the table one entry at a time, without silently reusing
stale data from the previous release. The update flow is pure shell
+ `sed` + `awk`, wrapped in a `nix-shell` shebang so the required
tooling (`nix-update`, `nix`, ...) is fetched automatically when
`maintainers/scripts/update.nix --argstr package handy` is invoked.1 parent 89316cc commit 26b6ef9
2 files changed
Lines changed: 95 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
278 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
279 | 286 | | |
280 | 287 | | |
281 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments