diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-05-26 20:09:12 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-05-27 20:35:27 -0300 |
commit | 048a15057a5c652e553ed55cb1ebb8a744d6e1e0 (patch) | |
tree | 3c6f928aeb80648fef0895761dcfec9200469f32 /pkgs/by-name/zi | |
parent | fc307abbd80812c51b1dbecd2871ef66916d9ce4 (diff) |
zig-shell-completions: migrate to by-name
Diffstat (limited to 'pkgs/by-name/zi')
-rw-r--r-- | pkgs/by-name/zi/zig-shell-completions/package.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/by-name/zi/zig-shell-completions/package.nix b/pkgs/by-name/zi/zig-shell-completions/package.nix new file mode 100644 index 0000000000000..44773cf9a553e --- /dev/null +++ b/pkgs/by-name/zi/zig-shell-completions/package.nix @@ -0,0 +1,42 @@ +{ 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; + }; +}) |