Skip to content

Commit 12166f5

Browse files
committed
nix flake: initial darwin build support
1 parent 24bb735 commit 12166f5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
systems = [
1515
"aarch64-linux"
1616
"x86_64-linux"
17+
"aarch64-darwin"
18+
"x86_64-darwin"
1719
];
1820
lib = nixpkgs.lib;
1921
forEachSystem = lib.genAttrs systems;
@@ -22,6 +24,8 @@
2224
bunTarget = {
2325
"aarch64-linux" = "bun-linux-arm64";
2426
"x86_64-linux" = "bun-linux-x64";
27+
"aarch64-darwin" = "bun-darwin-arm64";
28+
"x86_64-darwin" = "bun-darwin-x64";
2529
};
2630
scripts = ./nix/scripts;
2731
hashes = builtins.fromJSON (builtins.readFile ./nix/hashes.json);

nix/hashes.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
},
55
"nodeModules": {
66
"aarch64-linux": "sha256-KR8T/383mgpUJtqcz+LdILpwLulgnlDIpC9jX2pvaiY=",
7-
"x86_64-linux": "sha256-z50WGVHLm3XEVXwA8A1Y1dxS62Ht5IoZHGsNILs2oBI="
7+
"x86_64-linux": "sha256-z50WGVHLm3XEVXwA8A1Y1dxS62Ht5IoZHGsNILs2oBI=",
8+
"aarch64-darwin": "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
9+
"x86_64-darwin": "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
810
},
911
"optional": {
1012
"@parcel/watcher-linux-arm64-glibc": {

nix/opencode.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
9090
platforms = [
9191
"aarch64-linux"
9292
"x86_64-linux"
93+
"aarch64-darwin"
94+
"x86_64-darwin"
9395
];
9496
mainProgram = "opencode";
9597
};

0 commit comments

Comments
 (0)