depot/third_party/nixpkgs/pkgs/shells/carapace/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

39 lines
875 B
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
buildGoModule rec {
pname = "carapace";
version = "1.0.3";
src = fetchFromGitHub {
owner = "rsteube";
repo = "${pname}-bin";
rev = "v${version}";
hash = "sha256-nmih6kyVaYLVOG+EEaCUYkVRAXPXXUdPchv6JFzlU+U=";
};
vendorHash = "sha256-QG+50wqYYpASzFv8Y3rpuyahW/lTV8Kz+v3rDt1kAN4=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
subPackages = [ "./cmd/carapace" ];
tags = [ "release" ];
preBuild = ''
GOOS= GOARCH= go generate ./...
'';
passthru.tests.version = testers.testVersion { package = carapace; };
meta = with lib; {
description = "Multi-shell multi-command argument completer";
homepage = "https://carapace.sh/";
maintainers = with maintainers; [ mimame ];
license = licenses.mit;
mainProgram = "carapace";
};
}