blob: 01bb7229fd43e3f658d6e7aa9b633fb85662e0bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{
lib,
gettext,
fetchFromGitHub,
sqlite,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sqlite-vec";
version = "0.1.2";
src = fetchFromGitHub {
owner = "asg017";
repo = "sqlite-vec";
rev = "v${finalAttrs.version}";
hash = "sha256-8vof4gfESfWHAW+MBYdhyte2bKnVk+VEiowDK42/G/0=";
};
nativeBuildInputs = [ gettext ];
buildInputs = [ sqlite ];
makeFlags = [
"loadable"
"static"
];
installPhase = ''
runHook preInstall
install -Dm444 -t "$out/lib" \
"dist/libsqlite_vec0${stdenv.hostPlatform.extensions.staticLibrary}" \
"dist/vec0${stdenv.hostPlatform.extensions.sharedLibrary}"
runHook postInstall
'';
meta = with lib; {
description = "Vector search SQLite extension that runs anywhere";
homepage = "https://github.com/asg017/sqlite-vec";
changelog = "https://github.com/asg017/sqlite-vec/releases/tag/${finalAttrs.src.rev}";
license = licenses.mit;
maintainers = [ maintainers.anmonteiro ];
platforms = platforms.unix;
};
})
|