diff --git a/pkgs/by-name/si/sizelint/package.nix b/pkgs/by-name/si/sizelint/package.nix index 7bac1c3ef04c..0e87404b9634 100644 --- a/pkgs/by-name/si/sizelint/package.nix +++ b/pkgs/by-name/si/sizelint/package.nix @@ -1,7 +1,9 @@ { lib, + stdenv, rustPlatform, fetchFromGitHub, + installShellFiles, git, }: @@ -16,10 +18,19 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "sha256-m8Pd7Bnz++5k6J4stbKVd8Y596Y+52xbF0zFJVhdfzI="; }; + nativeBuildInputs = [ installShellFiles ]; + nativeCheckInputs = [ git ]; cargoHash = "sha256-7cDZrRNTGPdzbvVNt3/HTp7PgoH2txX26RCxdpeo4dM="; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd sizelint \ + --bash <($out/bin/sizelint completions bash) \ + --fish <($out/bin/sizelint completions fish) \ + --zsh <($out/bin/sizelint completions zsh) + ''; + meta = { description = "Lint your file tree based on file sizes"; homepage = "https://github.com/a-kenji/sizelint";