ci: simplify nix hash updates
exposes the platform specific node_module derivations at the flake level so that any builder can calculate any host platform hash
allows 1 builder to update all 4 supported platform hashes - turning 5 jobs and 4 artifacts into 1 job
NOTE: i had opus make the changes to the workflow, I'm not super familiar with actions
manually verified that all 4 current hashes match up with the new exposed package hashes
supersedes #8985
Hey! Your PR title ci: simplifty nix hash updates doesn't follow conventional commit format.
Please update it to start with one of:
-
feat:orfeat(scope):new feature -
fix:orfix(scope):bug fix -
docs:ordocs(scope):documentation changes -
chore:orchore(scope):maintenance tasks -
refactor:orrefactor(scope):code refactoring -
test:ortest(scope):adding or updating tests
Where scope is the package name (e.g., app, desktop, opencode).
See CONTRIBUTING.md for details.
The following comment was made by an LLM, it may be inaccurate:
Found a potentially related PR:
PR #8985: "feat(nix): nix-shell shebang update-hashes script" https://github.com/anomalyco/opencode/pull/8985
This PR appears to be related as it also deals with nix hash updates. It may address the same problem or provide complementary changes to the nix hash update process.
All other results returned the current PR itself (#9309), which indicates no other closely matching open PRs exist.
maybe its time i write a prefetch-bun-deps to parallel prefetch-npm-deps
hmm @gigamonster256
Computing hash for x86_64-linux...
copying path '/nix/store/i0434khkhh8qf82py9265hk0a5xkr33k-source' from 'https://cache.nixos.org/'...
error: flake 'git+file:///home/runner/_work/opencode/opencode' does not provide attribute 'packages.x86_64-linux.packages.x86_64-linux.x86_64-linux_node_modules', 'legacyPackages.x86_64-linux.packages.x86_64-linux.x86_64-linux_node_modules' or 'packages.x86_64-linux.x86_64-linux_node_modules'
Did you mean x86_64_linux_node_modules?
Failed to determine correct node_modules hash for x86_64-linux.
copying path '/nix/store/i0434khkhh8qf82py9265hk0a5xkr33k-source' from 'https://cache.nixos.org/'...
error: flake 'git+file:///home/runner/_work/opencode/opencode' does not provide attribute 'packages.x86_64-linux.packages.x86_64-linux.x86_64-linux_node_modules', 'legacyPackages.x86_64-linux.packages.x86_64-linux.x86_64-linux_node_modules' or 'packages.x86_64-linux.x86_64-linux_node_modules'
Did you mean x86_64_linux_node_modules?
oops, didn't catch the mismatched hypen/underscore - see #9352