nixpkgs/pkgs/shells/carapace/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
887 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, testers, carapace }:
2022-01-27 20:38:24 +00:00
2022-09-07 21:23:48 +00:00
buildGoModule rec {
2022-01-27 20:38:24 +00:00
pname = "carapace";
2024-04-15 00:24:23 +00:00
version = "1.0.1";
2022-01-27 20:38:24 +00:00
src = fetchFromGitHub {
owner = "rsteube";
repo = "${pname}-bin";
rev = "v${version}";
2024-04-15 00:24:23 +00:00
hash = "sha256-pyuehQZVg+f51r/oEH+FIpUUDTCKu4R9DmMaOffRfXA=";
2022-01-27 20:38:24 +00:00
};
2024-04-15 00:24:23 +00:00
vendorHash = "sha256-HWczvkItE9SVGGQkddnb7/PBkTWrDAdKHjMOztlYV9M=";
2022-01-27 20:38:24 +00:00
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
2022-01-27 20:38:24 +00:00
subPackages = [ "./cmd/carapace" ];
tags = [ "release" ];
preBuild = ''
2023-12-29 21:34:54 +00:00
GOOS= GOARCH= go generate ./...
2022-01-27 20:38:24 +00:00
'';
passthru.tests.version = testers.testVersion { package = carapace; };
2022-01-27 20:38:24 +00:00
meta = with lib; {
description = "Multi-shell multi-command argument completer";
homepage = "https://rsteube.github.io/carapace-bin/";
2024-04-16 18:43:21 +00:00
maintainers = with maintainers; [ ];
2022-01-27 20:38:24 +00:00
license = licenses.mit;
2023-09-05 17:24:42 +00:00
mainProgram = "carapace";
2022-01-27 20:38:24 +00:00
};
}