Skip to content

Commit 494d9db

Browse files
committed
Merge remote-tracking branch 'origin/use-bun-canary' into nix-auto-updates
2 parents 4f4b318 + 94fdf08 commit 494d9db

5 files changed

Lines changed: 123 additions & 15 deletions

File tree

flake.lock

Lines changed: 105 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
re-nixpkgs.url = "github:ReStranger/re-nixpkgs";
67
};
78

89
outputs =
9-
{ self, nixpkgs, ... }:
10+
{ self, nixpkgs, re-nixpkgs, ... } @ inputs:
1011
let
1112
systems = [
1213
"aarch64-linux"
@@ -21,7 +22,7 @@
2122
devShells = forEachSystem (pkgs: {
2223
default = pkgs.mkShell {
2324
packages = with pkgs; [
24-
bun
25+
re-nixpkgs.packages.${pkgs.system}.bun-canary
2526
nodejs_20
2627
pkg-config
2728
openssl
@@ -35,15 +36,15 @@
3536
final: _prev:
3637
let
3738
node_modules = final.callPackage ./nix/node_modules.nix {
38-
inherit rev;
39+
inherit rev inputs;
3940
};
4041
in
4142
rec {
4243
opencode = final.callPackage ./nix/opencode.nix {
43-
inherit node_modules;
44+
inherit node_modules inputs;
4445
};
4546
opencode-desktop = final.callPackage ./nix/desktop.nix {
46-
inherit opencode;
47+
inherit opencode inputs;
4748
};
4849
};
4950
};
@@ -52,16 +53,16 @@
5253
pkgs:
5354
let
5455
node_modules = pkgs.callPackage ./nix/node_modules.nix {
55-
inherit rev;
56+
inherit rev inputs;
5657
};
5758
in
5859
rec {
5960
default = opencode;
6061
opencode = pkgs.callPackage ./nix/opencode.nix {
61-
inherit node_modules;
62+
inherit node_modules inputs;
6263
};
6364
opencode-desktop = pkgs.callPackage ./nix/desktop.nix {
64-
inherit opencode;
65+
inherit opencode inputs;
6566
};
6667
# Updater derivation with fakeHash - build fails and reveals correct hash
6768
node_modules_updater = node_modules.override {

nix/desktop.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
lib,
3+
inputs,
4+
pkgs,
35
stdenv,
4-
bun,
56
nodejs,
67
darwin,
78
electron_41,
@@ -23,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
2324
;
2425

2526
nativeBuildInputs = [
26-
bun
27+
inputs.re-nixpkgs.packages.${pkgs.stdenv.hostPlatform.system}.bun-canary
2728
nodejs
2829
makeWrapper
2930
writableTmpDirAsHomeHook

nix/node_modules.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
lib,
3+
inputs,
4+
pkgs,
35
stdenvNoCC,
4-
bun,
56
rev ? "dirty",
67
hash ?
78
(lib.pipe ./hashes.json [
@@ -41,7 +42,7 @@ stdenvNoCC.mkDerivation {
4142
"SOCKS_SERVER"
4243
];
4344

44-
nativeBuildInputs = [ bun ];
45+
nativeBuildInputs = [ inputs.re-nixpkgs.packages.${pkgs.stdenv.hostPlatform.system}.bun-canary ];
4546

4647
dontConfigure = true;
4748

nix/opencode.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
lib,
3+
inputs,
4+
pkgs,
35
stdenvNoCC,
46
callPackage,
5-
bun,
67
nodejs,
78
sysctl,
89
makeBinaryWrapper,
@@ -19,7 +20,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
1920
inherit node_modules;
2021

2122
nativeBuildInputs = [
22-
bun
23+
inputs.re-nixpkgs.packages.${pkgs.stdenv.hostPlatform.system}.bun-canary
2324
nodejs # for patchShebangs node_modules
2425
installShellFiles
2526
makeBinaryWrapper

0 commit comments

Comments
 (0)