Skip to content

Commit 780c73b

Browse files
authored
rlama: init at 0.1.29 (#388501)
2 parents ce52a4d + 1962b52 commit 780c73b

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

pkgs/by-name/rl/rlama/package.nix

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
pkg-config,
6+
makeWrapper,
7+
poppler-utils,
8+
tesseract,
9+
catdoc,
10+
python3Packages,
11+
versionCheckHook,
12+
nix-update-script,
13+
}:
14+
15+
buildGoModule rec {
16+
pname = "rlama";
17+
version = "0.1.29";
18+
19+
src = fetchFromGitHub {
20+
owner = "dontizi";
21+
repo = "rlama";
22+
tag = "v${version}";
23+
hash = "sha256-Zaw2itvfUC+5fVHGfPQ+qWfjLzPqowAFt8kvBYHR9B0=";
24+
};
25+
26+
vendorHash = "sha256-oJulwIMb9DpgRZFxw4/WMejrFONbCC8ni0YclS1WwT0=";
27+
28+
env.CGO_ENABLED = "0";
29+
30+
ldflags = [
31+
"-s"
32+
"-w"
33+
];
34+
35+
nativeBuildInputs = [
36+
pkg-config
37+
makeWrapper
38+
];
39+
40+
postInstall = ''
41+
wrapProgram $out/bin/rlama \
42+
--prefix PATH : ${
43+
lib.makeBinPath [
44+
poppler-utils
45+
tesseract
46+
catdoc
47+
python3Packages.pdfminer-six
48+
python3Packages.docx2txt
49+
python3Packages.xlsx2csv
50+
]
51+
}
52+
'';
53+
54+
nativeInstallCheckInputs = [
55+
versionCheckHook
56+
];
57+
versionCheckProgramArg = [ "--version" ];
58+
doInstallCheck = true;
59+
60+
passthru = {
61+
updateScript = nix-update-script { };
62+
};
63+
64+
meta = {
65+
description = "Retrieval-Augmented Language Model Adapter";
66+
homepage = "https://github.com/dontizi/rlama";
67+
changelog = "https://github.com/dontizi/rlama/releases/tag/v${version}";
68+
license = lib.licenses.asl20;
69+
maintainers = with lib.maintainers; [ liberodark ];
70+
mainProgram = "rlama";
71+
};
72+
}

0 commit comments

Comments
 (0)