nixpkgs/pkgs/shells/carapace/default.nix
2024-04-17 10:46:02 -04:00

40 lines
887 B
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
buildGoModule rec {
pname = "carapace";
version = "1.0.1";
src = fetchFromGitHub {
owner = "rsteube";
repo = "${pname}-bin";
rev = "v${version}";
hash = "sha256-pyuehQZVg+f51r/oEH+FIpUUDTCKu4R9DmMaOffRfXA=";
};
vendorHash = "sha256-HWczvkItE9SVGGQkddnb7/PBkTWrDAdKHjMOztlYV9M=";
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://rsteube.github.io/carapace-bin/";
maintainers = with maintainers; [ ];
license = licenses.mit;
mainProgram = "carapace";
};
}