File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed
Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments