2023-08-18 07:58:58 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2023-08-21 11:50:54 +00:00
|
|
|
, unstableGitUpdater
|
2023-08-18 07:58:58 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-21 11:50:54 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-08-18 07:58:58 +00:00
|
|
|
pname = "zig-shell-completions";
|
|
|
|
version = "unstable-2023-08-17";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ziglang";
|
|
|
|
repo = "shell-completions";
|
|
|
|
rev = "de9f83166d792cce6a0524e63d2755952dd9872c";
|
|
|
|
hash = "sha256-92n41/AWbHYkXiBtbWw+hXZKJCE7KW9igd8cLSBQfHo=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
installShellCompletion --bash --name zig.bash _zig.bash
|
|
|
|
installShellCompletion --zsh --name _zig _zig
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-08-21 11:50:54 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
|
|
|
meta = {
|
2023-08-18 07:58:58 +00:00
|
|
|
homepage = "https://github.com/ziglang/shell-completions";
|
|
|
|
description = "Shell completions for the Zig compiler";
|
2023-08-21 11:50:54 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ aaronjheng ];
|
|
|
|
platforms = lib.platforms.all;
|
2023-08-18 07:58:58 +00:00
|
|
|
};
|
2023-08-21 11:50:54 +00:00
|
|
|
})
|