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";
|
2023-05-18 06:23:23 +02:00
|
|
|
version = "0.24.5";
|
2022-01-27 21:38:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rsteube";
|
|
|
|
repo = "${pname}-bin";
|
|
|
|
rev = "v${version}";
|
2023-05-18 06:23:23 +02:00
|
|
|
sha256 = "sha256-R54zIWo8u7GIYvj3eyxwP7ffOg3Dw8ObwZQmSSlu3YY=";
|
2022-01-27 21:38:24 +01:00
|
|
|
};
|
|
|
|
|
2023-05-18 06:23:23 +02:00
|
|
|
vendorHash = "sha256-3ukm9bIGYdYfHGQOy6KYah2GuLWGWW/JJ1uA7R3i1PE=";
|
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 = ''
|
|
|
|
go generate ./...
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|