2023-04-01 13:46:25 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
|
2022-01-27 20:38:24 +00:00
|
|
|
|
2022-09-07 21:23:48 +00:00
|
|
|
buildGoModule rec {
|
2022-01-27 20:38:24 +00:00
|
|
|
pname = "carapace";
|
2024-10-04 06:38:22 +00:00
|
|
|
version = "1.0.7";
|
2022-01-27 20:38:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-09-12 05:19:14 +00:00
|
|
|
owner = "carapace-sh";
|
|
|
|
repo = "carapace-bin";
|
2022-01-27 20:38:24 +00:00
|
|
|
rev = "v${version}";
|
2024-10-04 06:38:22 +00:00
|
|
|
hash = "sha256-ryFnccCSgQ0qEf3oRPmIO98fx2BlkK2dEFvNk2m9qSo=";
|
2022-01-27 20:38:24 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 06:38:22 +00:00
|
|
|
vendorHash = "sha256-biJN+WjNK/Fjjd3+ihZcFCu75fup3g9R6lIa6qHco5I=";
|
2022-01-27 20:38:24 +00:00
|
|
|
|
2023-04-01 13:46:25 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2022-01-27 20:38:24 +00:00
|
|
|
subPackages = [ "./cmd/carapace" ];
|
|
|
|
|
|
|
|
tags = [ "release" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
2023-12-29 21:34:54 +00:00
|
|
|
GOOS= GOARCH= go generate ./...
|
2022-01-27 20:38:24 +00:00
|
|
|
'';
|
|
|
|
|
2023-04-01 13:46:25 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = carapace; };
|
|
|
|
|
2022-01-27 20:38:24 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Multi-shell multi-command argument completer";
|
2024-05-25 00:15:46 +00:00
|
|
|
homepage = "https://carapace.sh/";
|
2024-05-06 07:18:14 +00:00
|
|
|
maintainers = with maintainers; [ mimame ];
|
2022-01-27 20:38:24 +00:00
|
|
|
license = licenses.mit;
|
2023-09-05 17:24:42 +00:00
|
|
|
mainProgram = "carapace";
|
2022-01-27 20:38:24 +00:00
|
|
|
};
|
|
|
|
}
|