diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3fc91a9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1769188852, + "narHash": "sha256-aBAGyMum27K7cP5OR7BMioJOF3icquJMZDDgk6ZEg1A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a1bab9e494f5f4939442a57a58d0449a109593fe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index e702d71..0d8db98 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,13 @@ let pkgs = nixpkgs.legacyPackages.${system}; + # SQLite with loadable extension support for sqlite-vec + sqliteWithExtensions = pkgs.sqlite.overrideAttrs (old: { + configureFlags = (old.configureFlags or []) ++ [ + "--enable-load-extension" + ]; + }); + qmd = pkgs.stdenv.mkDerivation { pname = "qmd"; version = "1.0.0"; @@ -62,10 +69,11 @@ devShells.default = pkgs.mkShell { buildInputs = [ pkgs.bun - pkgs.sqlite + sqliteWithExtensions ]; shellHook = '' + export BREW_PREFIX="''${BREW_PREFIX:-${sqliteWithExtensions.out}}" echo "QMD development shell" echo "Run: bun src/qmd.ts " '';