2023-08-18 09:58:58 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2023-08-21 13:50:54 +02:00
|
|
|
, unstableGitUpdater
|
2023-08-18 09:58:58 +02:00
|
|
|
}:
|
|
|
|
|
2023-08-21 13:50:54 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-08-18 09:58:58 +02:00
|
|
|
pname = "zig-shell-completions";
|
2023-12-10 14:13:32 +01:00
|
|
|
version = "unstable-2023-11-18";
|
2023-08-18 09:58:58 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ziglang";
|
|
|
|
repo = "shell-completions";
|
2023-12-10 14:13:32 +01:00
|
|
|
rev = "31d3ad12890371bf467ef7143f5c2f31cfa7b7c1";
|
|
|
|
hash = "sha256-ID/K0vdg7BTKGgozISk/X4RBxCVfhSkVD6GSZUoP9Ls=";
|
2023-08-18 09:58:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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 13:50:54 +02:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
|
|
|
meta = {
|
2023-08-18 09:58:58 +02:00
|
|
|
homepage = "https://github.com/ziglang/shell-completions";
|
|
|
|
description = "Shell completions for the Zig compiler";
|
2023-08-21 13:50:54 +02:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ aaronjheng ];
|
|
|
|
platforms = lib.platforms.all;
|
2023-08-18 09:58:58 +02:00
|
|
|
};
|
2023-08-21 13:50:54 +02:00
|
|
|
})
|