2023-04-01 15:46:25 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
|
2022-01-27 21:38:24 +01:00
|
|
|
|
2022-09-07 23:23:48 +02:00
|
|
|
buildGoModule rec {
|
2022-01-27 21:38:24 +01:00
|
|
|
pname = "carapace";
|
2024-03-14 02:43:08 +01:00
|
|
|
version = "1.0.0";
|
2022-01-27 21:38:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rsteube";
|
|
|
|
repo = "${pname}-bin";
|
|
|
|
rev = "v${version}";
|
2024-03-14 02:43:08 +01:00
|
|
|
hash = "sha256-lc+oU9adFbtQyb4wKLgbf5i6UwxsKUJo3giquDTO6qg=";
|
2022-01-27 21:38:24 +01:00
|
|
|
};
|
|
|
|
|
2024-03-14 02:43:08 +01:00
|
|
|
vendorHash = "sha256-XAdTLfMnOAcOiRYZGrom2Q+qp+epfg6Y9Jv0V0T12/8=";
|
2022-01-27 21:38:24 +01:00
|
|
|
|
2023-04-01 15:46:25 +02:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2022-01-27 21:38:24 +01:00
|
|
|
subPackages = [ "./cmd/carapace" ];
|
|
|
|
|
|
|
|
tags = [ "release" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
2023-12-29 22:34:54 +01:00
|
|
|
GOOS= GOARCH= go generate ./...
|
2022-01-27 21:38:24 +01:00
|
|
|
'';
|
|
|
|
|
2023-04-01 15:46:25 +02:00
|
|
|
passthru.tests.version = testers.testVersion { package = carapace; };
|
|
|
|
|
2022-01-27 21:38:24 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Multi-shell multi-command argument completer";
|
|
|
|
homepage = "https://rsteube.github.io/carapace-bin/";
|
2023-04-01 15:46:25 +02:00
|
|
|
maintainers = with maintainers; [ star-szr ];
|
2022-01-27 21:38:24 +01:00
|
|
|
license = licenses.mit;
|
2023-09-05 19:24:42 +02:00
|
|
|
mainProgram = "carapace";
|
2022-01-27 21:38:24 +01:00
|
|
|
};
|
|
|
|
}
|