depot/third_party/nixpkgs/pkgs/shells/carapace/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

39 lines
879 B
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
buildGoModule rec {
pname = "carapace";
version = "1.0.6";
src = fetchFromGitHub {
owner = "carapace-sh";
repo = "carapace-bin";
rev = "v${version}";
hash = "sha256-onkYihS4abrOfqOehlDy+ooL2d04w6DwOY3+B4+L3IQ=";
};
vendorHash = "sha256-UFpQAlXFS1O/MqeGvUAWSQLhP03wf8JX8zz8cMyMmrc=";
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";
};
}