nixpkgs/pkgs/shells/carapace/default.nix
2023-04-19 05:44:21 +00:00

39 lines
887 B
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
buildGoModule rec {
pname = "carapace";
version = "0.24.4";
src = fetchFromGitHub {
owner = "rsteube";
repo = "${pname}-bin";
rev = "v${version}";
sha256 = "sha256-UEvmaUr/3Fq92HSfBPxSpfuo5mp5zMSYGZu2HLZvUq0=";
};
vendorHash = "sha256-4Q8yBDds2EIxt5Caxoq8hk4X6ADwVe04P3Jt3L+Qf0M=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
subPackages = [ "./cmd/carapace" ];
tags = [ "release" ];
preBuild = ''
go generate ./...
'';
passthru.tests.version = testers.testVersion { package = carapace; };
meta = with lib; {
description = "Multi-shell multi-command argument completer";
homepage = "https://rsteube.github.io/carapace-bin/";
maintainers = with maintainers; [ star-szr ];
license = licenses.mit;
platforms = platforms.unix;
};
}