chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / sq / sqlite-vss / package.nix
blobbc3612ceebe0109bfda9ced2ce19987314373108
1 { lib
2 , cmake
3 , faiss
4 , fetchFromGitHub
5 , gomp
6 , llvmPackages
7 , nlohmann_json
8 , sqlite
9 , stdenv
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "sqlite-vss";
14   version = "0.1.2";
16   src = fetchFromGitHub {
17     owner = "asg017";
18     repo = "sqlite-vss";
19     rev = "v${finalAttrs.version}";
20     hash = "sha256-cb9UlSUAZp8B5NpNDBvJ2+ung98gjVKLxrM2Ek9fOcs=";
21   };
23   patches = [ ./use-nixpkgs-libs.patch ];
25   nativeBuildInputs = [ cmake ];
27   buildInputs = [ nlohmann_json faiss sqlite ]
28     ++ lib.optional stdenv.hostPlatform.isLinux gomp
29     ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
31   SQLITE_VSS_CMAKE_VERSION = finalAttrs.version;
33   installPhase = ''
34     runHook preInstall
36     install -Dm444 -t "$out/lib" \
37       "libsqlite_vector0${stdenv.hostPlatform.extensions.staticLibrary}" \
38       "libsqlite_vss0${stdenv.hostPlatform.extensions.staticLibrary}" \
39       "vector0${stdenv.hostPlatform.extensions.sharedLibrary}" \
40       "vss0${stdenv.hostPlatform.extensions.sharedLibrary}"
42     runHook postInstall
43   '';
45   meta = with lib;{
46     # Low maintenance mode, doesn't support up-to-date faiss
47     # https://github.com/NixOS/nixpkgs/pull/330191#issuecomment-2252965866
48     broken = lib.versionAtLeast faiss.version "1.8.0";
49     description = "SQLite extension for efficient vector search based on Faiss";
50     homepage = "https://github.com/asg017/sqlite-vss";
51     changelog = "https://github.com/asg017/sqlite-vss/releases/tag/v${finalAttrs.version}";
52     license = licenses.mit;
53     platforms = platforms.unix;
54   };