nixpkgs/pkgs/by-name/zo/zoekt/package.nix

42 lines
913 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, git
, nix-update-script
}:
buildGoModule {
pname = "zoekt";
version = "3.7.2-2-unstable-2024-10-01";
src = fetchFromGitHub {
owner = "sourcegraph";
repo = "zoekt";
rev = "650136078a98ef99acf4159310a2c12fd25075d7";
hash = "sha256-MtN/x5o0iHZeDqIQCuio8y5pmZXq5qFIE6FySgIY2CY=";
};
vendorHash = "sha256-+ayixWCD2e+7Nh9WJmDAloSzp63v9hQYQd8UMuo8qxQ=";
nativeCheckInputs = [
git
];
preCheck = ''
export HOME=`mktemp -d`
git config --global --replace-all protocol.file.allow always
'';
passthru.updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
};
meta = {
description = "Fast trigram based code search";
homepage = "https://github.com/sourcegraph/zoekt";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ AndersonTorres ];
mainProgram = "zoekt";
};
}