mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:53:17 +00:00
40 lines
883 B
Nix
40 lines
883 B
Nix
{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
|
|
|
|
buildGoModule rec {
|
|
pname = "carapace";
|
|
version = "0.28.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rsteube";
|
|
repo = "${pname}-bin";
|
|
rev = "v${version}";
|
|
hash = "sha256-Yl/eRp+KRh9whSYjB3IK6vwtknWAicpYQ8/Rjjeef4s=";
|
|
};
|
|
|
|
vendorHash = "sha256-pcvxIPyJwptYx5964NzR9LUJTld2JVA0zaSjGH5sz4E=";
|
|
|
|
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;
|
|
mainProgram = "carapace";
|
|
};
|
|
}
|