depot/third_party/nixpkgs/pkgs/by-name/zi/zig-shell-completions/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

43 lines
993 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
unstableGitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "zig-shell-completions";
version = "0-unstable-2023-11-18";
src = fetchFromGitHub {
owner = "ziglang";
repo = "shell-completions";
rev = "31d3ad12890371bf467ef7143f5c2f31cfa7b7c1";
hash = "sha256-ID/K0vdg7BTKGgozISk/X4RBxCVfhSkVD6GSZUoP9Ls=";
};
nativeBuildInputs = [ installShellFiles ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
installShellCompletion --bash --name zig.bash _zig.bash
installShellCompletion --zsh --name _zig _zig
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };
meta = {
homepage = "https://github.com/ziglang/shell-completions";
description = "Shell completions for the Zig compiler";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aaronjheng ];
platforms = lib.platforms.all;
};
})