mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
40 lines
875 B
Nix
40 lines
875 B
Nix
{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
|
|
|
|
buildGoModule rec {
|
|
pname = "carapace";
|
|
version = "1.0.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rsteube";
|
|
repo = "${pname}-bin";
|
|
rev = "v${version}";
|
|
hash = "sha256-PDxYRFf7nQfPb6uazwRmZOvCy3xMF5OqHDLy7hsFSBE=";
|
|
};
|
|
|
|
vendorHash = "sha256-GnwOyIKJ1K8+0a+VrXcohclgxnQTezu4S0C2cJO+ULU=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
];
|
|
|
|
subPackages = [ "./cmd/carapace" ];
|
|
|
|
tags = [ "release" ];
|
|
|
|
preBuild = ''
|
|
GOOS= GOARCH= go generate ./...
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion { package = carapace; };
|
|
|
|
meta = with lib; {
|
|
description = "Multi-shell multi-command argument completer";
|
|
homepage = "https://carapace.sh/";
|
|
maintainers = with maintainers; [ mimame ];
|
|
license = licenses.mit;
|
|
mainProgram = "carapace";
|
|
};
|
|
}
|