2023-04-12 12:48:02 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "carapace";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.28.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rsteube";
|
|
|
|
repo = "${pname}-bin";
|
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-0ubZt4KsjsoIcglo/lh9JDAZjuACBNdVLJazH0Csxl0=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
vendorHash = "sha256-35Gmye5NPOtUaW8zNkjK0cQ3FRB1fK7UyqT5c17rls4=";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
subPackages = [ "./cmd/carapace" ];
|
|
|
|
|
|
|
|
tags = [ "release" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
go generate ./...
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = carapace; };
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Multi-shell multi-command argument completer";
|
|
|
|
homepage = "https://rsteube.github.io/carapace-bin/";
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ star-szr ];
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "carapace";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|