gradle-completion: init at 1.3.1 (#42929)

This package adds completion scripts for `gradle` on the `bash` and
`zsh` shells.

The completions can be enabled like this:

```
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.gradle pkgs.gradle-completion ];
programs.zsh.enable = true;
}
```

The package stores the scripts into the expected directories in
`$out/share` to ensure that the shells can easily find their scripts.

Closes #42799

authored by Maximilian Bosch and committed by xeji 4dfea241 c6bea115

+37
+35
pkgs/shells/zsh/gradle-completion/default.nix
···
··· 1 + { stdenv, fetchFromGitHub }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "gradle-completion-${version}"; 5 + version = "1.3.1"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "gradle"; 9 + repo = "gradle-completion"; 10 + rev = "v${version}"; 11 + sha256 = "02vv360r78ckwc6r4xbhmy5dxz6l9ya4lq9c62zh12ciq94y9kgx"; 12 + }; 13 + 14 + # we just move two files into $out, 15 + # this shouldn't bother Hydra. 16 + preferLocalBuild = true; 17 + 18 + dontBuild = true; 19 + installPhase = '' 20 + runHook preInstall 21 + 22 + mkdir -p $out 23 + install -Dm0644 ./_gradle $out/share/zsh/site-functions/_gradle 24 + install -Dm0644 ./gradle-completion.bash $out/share/bash-completion/completions/gradle 25 + 26 + runHook postInstall 27 + ''; 28 + 29 + meta = with stdenv.lib; { 30 + description = "Gradle tab completion for bash and zsh"; 31 + homepage = https://github.com/gradle/gradle-completion; 32 + license = licenses.mit; 33 + maintainers = with maintainers; [ ma27 ]; 34 + }; 35 + }
+2
pkgs/top-level/all-packages.nix
··· 6040 6041 bash-completion = callPackage ../shells/bash/bash-completion { }; 6042 6043 nix-bash-completions = callPackage ../shells/bash/nix-bash-completions { }; 6044 6045 dash = callPackage ../shells/dash { };
··· 6040 6041 bash-completion = callPackage ../shells/bash/bash-completion { }; 6042 6043 + gradle-completion = callPackage ../shells/zsh/gradle-completion { }; 6044 + 6045 nix-bash-completions = callPackage ../shells/bash/nix-bash-completions { }; 6046 6047 dash = callPackage ../shells/dash { };