nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 55 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 nodejs, 6 fetchPnpmDeps, 7 pnpmConfigHook, 8 pnpm, 9 npmHooks, 10 nix-update-script, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "mgrep"; 15 version = "0.1.6"; 16 17 src = fetchFromGitHub { 18 owner = "mixedbread-ai"; 19 repo = "mgrep"; 20 tag = "v${finalAttrs.version}"; 21 hash = "sha256-jGzOwonT4nq0nMUBBp4Y7BvwTerHLzkTMss9glM+uP4="; 22 }; 23 24 pnpmDeps = fetchPnpmDeps { 25 inherit (finalAttrs) pname version src; 26 fetcherVersion = 2; 27 hash = "sha256-oq7jczTfm6CgLAUYftBlAYK6MFELDRfXCFtjsLWV8mU="; 28 }; 29 30 nativeBuildInputs = [ 31 nodejs 32 pnpmConfigHook 33 pnpm 34 npmHooks.npmInstallHook 35 ]; 36 37 buildPhase = '' 38 runHook preBuild 39 pnpm build 40 runHook postBuild 41 ''; 42 43 dontNpmPrune = true; 44 45 passthru.updateScript = nix-update-script { }; 46 47 meta = { 48 description = "Semantic grep for local files using Mixedbread embeddings"; 49 homepage = "https://github.com/mixedbread-ai/mgrep"; 50 changelog = "https://github.com/mixedbread-ai/mgrep/releases/tag/v${finalAttrs.version}"; 51 license = lib.licenses.asl20; 52 maintainers = with lib.maintainers; [ andrewgazelka ]; 53 mainProgram = "mgrep"; 54 }; 55})