Skip to content

Commit c2f3a40

Browse files
committed
Derive flake version from package.json
1 parent 986fca3 commit c2f3a40

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
flake-utils.lib.eachDefaultSystem (system:
3434
let
3535
pkgs = nixpkgs.legacyPackages.${system};
36+
packageJson = builtins.fromJSON (builtins.readFile ./package.json);
37+
version = packageJson.version;
3638

3739
# SQLite with loadable extension support for sqlite-vec
3840
sqliteWithExtensions = pkgs.sqlite.overrideAttrs (old: {
@@ -52,7 +54,7 @@
5254

5355
nodeModules = pkgs.stdenvNoCC.mkDerivation {
5456
pname = "qmd-node-modules";
55-
version = "1.0.0";
57+
inherit version;
5658

5759
src = ./.;
5860

@@ -92,7 +94,7 @@
9294

9395
qmd = pkgs.stdenv.mkDerivation {
9496
pname = "qmd";
95-
version = "1.0.0";
97+
inherit version;
9698

9799
src = ./.;
98100

0 commit comments

Comments
 (0)