zig-shell-completions: refactor

- Use rec-less, overlay-style overridable recursive attributes (in effect since
https://github.com/NixOS/nixpkgs/pull/119942);
- Remove nested with (according to
https://nix.dev/anti-patterns/language#with-attrset-expression);
- Add updateScript.
This commit is contained in:
Anderson Torres 2023-08-21 08:50:54 -03:00
parent fd774bd82b
commit ebb4d8a13f

View file

@ -2,9 +2,10 @@
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, installShellFiles , installShellFiles
, unstableGitUpdater
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "zig-shell-completions"; pname = "zig-shell-completions";
version = "unstable-2023-08-17"; version = "unstable-2023-08-17";
@ -29,11 +30,13 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
meta = with lib; { passthru.updateScript = unstableGitUpdater { };
meta = {
homepage = "https://github.com/ziglang/shell-completions"; homepage = "https://github.com/ziglang/shell-completions";
description = "Shell completions for the Zig compiler"; description = "Shell completions for the Zig compiler";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ aaronjheng ]; maintainers = with lib.maintainers; [ aaronjheng ];
platforms = platforms.all; platforms = lib.platforms.all;
}; };
} })