Skip to content

Commit 0612cb7

Browse files
committed
nix flake: get the version from package.json instead of hardcoded
1 parent 1f9f719 commit 0612cb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
system:
4141
let
4242
pkgs = import nixpkgs { inherit system; };
43+
packageJson = builtins.fromJSON (builtins.readFile ./packages/opencode/package.json);
4344
bun-target = {
4445
"aarch64-linux" = "bun-linux-arm64";
4546
"x86_64-linux" = "bun-linux-x64";
@@ -74,7 +75,7 @@
7475
}:
7576
stdenvNoCC.mkDerivation (finalAttrs: {
7677
pname = "opencode";
77-
version = "1.0.23";
78+
version = packageJson.version;
7879

7980
src = ./.;
8081

0 commit comments

Comments
 (0)