rlama: 0.1.30 -> 0.1.36 (#407553)

authored by Gaétan Lepage and committed by GitHub 7db93ab8 55f5a7d2

+37 -12
+37 -12
pkgs/by-name/rl/rlama/package.nix
··· 3 3 buildGoModule, 4 4 fetchFromGitHub, 5 5 pkg-config, 6 - makeWrapper, 6 + makeBinaryWrapper, 7 7 poppler-utils, 8 8 tesseract, 9 9 catdoc, 10 + unrtf, 10 11 python3Packages, 11 - versionCheckHook, 12 12 nix-update-script, 13 + writableTmpDirAsHomeHook, 13 14 }: 14 15 15 - buildGoModule rec { 16 + buildGoModule (finalAttrs: { 16 17 pname = "rlama"; 17 - version = "0.1.30"; 18 + version = "0.1.36"; 18 19 19 20 src = fetchFromGitHub { 20 21 owner = "dontizi"; 21 22 repo = "rlama"; 22 - tag = "v${version}"; 23 - hash = "sha256-J4FTRWQfdmWXMhlwINQgqj7sCvF3+0YZwcZFW8y1CgY="; 23 + tag = "v${finalAttrs.version}"; 24 + hash = "sha256-SzrnpAkh+SMzF9xOAxZXondRulwPRUZYHrhe3rf06bA="; 24 25 }; 25 26 26 - vendorHash = "sha256-XZVMnkv+WqUqM6jbgrO3P5CSDACH3vLFJ4Y79EOnD08="; 27 + vendorHash = "sha256-GHmLCgL79BdGw/5zz50Y1kR/6JYNalvOj2zjIHQ9IF0="; 27 28 28 29 env.CGO_ENABLED = "0"; 29 30 ··· 34 35 35 36 nativeBuildInputs = [ 36 37 pkg-config 37 - makeWrapper 38 + makeBinaryWrapper 38 39 ]; 39 40 41 + # Run only unit tests for core packages; skip e2e tests that require Ollama 42 + checkPhase = '' 43 + runHook preCheck 44 + 45 + go test -v ./internal/domain/... ./pkg/vector/... ./internal/repository/... 46 + 47 + runHook postCheck 48 + ''; 49 + 40 50 postInstall = '' 41 51 wrapProgram $out/bin/rlama \ 42 52 --prefix PATH : ${ ··· 44 54 poppler-utils 45 55 tesseract 46 56 catdoc 57 + unrtf 47 58 python3Packages.pdfminer-six 48 59 python3Packages.docx2txt 49 60 python3Packages.xlsx2csv 61 + python3Packages.torch 62 + python3Packages.transformers 50 63 ] 51 64 } 52 65 ''; 53 66 54 67 nativeInstallCheckInputs = [ 55 - versionCheckHook 68 + writableTmpDirAsHomeHook 56 69 ]; 57 - versionCheckProgramArg = "--version"; 70 + 58 71 doInstallCheck = true; 72 + installCheckPhase = '' 73 + runHook preInstallCheck 74 + 75 + VERSION=$($out/bin/rlama --version | grep -o "${finalAttrs.version}" || true) 76 + if [ -z "$VERSION" ]; then 77 + echo "Version check failed: expected ${finalAttrs.version}, got: $($out/bin/rlama --version)" 78 + else 79 + echo "$VERSION" 80 + fi 81 + 82 + runHook postInstallCheck 83 + ''; 59 84 60 85 passthru = { 61 86 updateScript = nix-update-script { }; ··· 64 89 meta = { 65 90 description = "Retrieval-Augmented Language Model Adapter"; 66 91 homepage = "https://github.com/dontizi/rlama"; 67 - changelog = "https://github.com/dontizi/rlama/releases/tag/v${version}"; 92 + changelog = "https://github.com/dontizi/rlama/releases/tag/v${finalAttrs.version}"; 68 93 license = lib.licenses.asl20; 69 94 maintainers = with lib.maintainers; [ liberodark ]; 70 95 mainProgram = "rlama"; 71 96 }; 72 - } 97 + })