summaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
authorJérôme Benoit <[email protected]>2026-01-31 19:32:11 +0100
committerGitHub <[email protected]>2026-01-31 12:32:11 -0600
commit121d6a72c0bc62c8a0699db87fb4f11b1bb73a53 (patch)
tree830408a6e7cd650086715403a75c3baf0f2f2fa6 /flake.nix
parent35f64b80fa6825f8c14fd1654a1331b19db94a20 (diff)
downloadopencode-121d6a72c0bc62c8a0699db87fb4f11b1bb73a53.tar.gz
opencode-121d6a72c0bc62c8a0699db87fb4f11b1bb73a53.zip
fix(nix): restore native runners for darwin hash computation (#11495)
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix23
1 files changed, 5 insertions, 18 deletions
diff --git a/flake.nix b/flake.nix
index e4d214a0b..ea78b1a43 100644
--- a/flake.nix
+++ b/flake.nix
@@ -42,28 +42,15 @@
desktop = pkgs.callPackage ./nix/desktop.nix {
inherit opencode;
};
- # nixpkgs cpu naming to bun cpu naming
- cpuMap = { x86_64 = "x64"; aarch64 = "arm64"; };
- # matrix of node_modules builds - these will always fail due to fakeHash usage
- # but allow computation of the correct hash from any build machine for any cpu/os
- # see the update-nix-hashes workflow for usage
- moduleUpdaters = pkgs.lib.listToAttrs (
- pkgs.lib.concatMap (cpu:
- map (os: {
- name = "${cpu}-${os}_node_modules";
- value = node_modules.override {
- bunCpu = cpuMap.${cpu};
- bunOs = os;
- hash = pkgs.lib.fakeHash;
- };
- }) [ "linux" "darwin" ]
- ) [ "x86_64" "aarch64" ]
- );
in
{
default = opencode;
inherit opencode desktop;
- } // moduleUpdaters
+ # Updater derivation with fakeHash - build fails and reveals correct hash
+ node_modules_updater = node_modules.override {
+ hash = pkgs.lib.fakeHash;
+ };
+ }
);
};
}