mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
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
This commit is contained in:
parent
c6bea11567
commit
4dfea241bc
35
pkgs/shells/zsh/gradle-completion/default.nix
Normal file
35
pkgs/shells/zsh/gradle-completion/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gradle-completion-${version}";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gradle";
|
||||
repo = "gradle-completion";
|
||||
rev = "v${version}";
|
||||
sha256 = "02vv360r78ckwc6r4xbhmy5dxz6l9ya4lq9c62zh12ciq94y9kgx";
|
||||
};
|
||||
|
||||
# we just move two files into $out,
|
||||
# this shouldn't bother Hydra.
|
||||
preferLocalBuild = true;
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
install -Dm0644 ./_gradle $out/share/zsh/site-functions/_gradle
|
||||
install -Dm0644 ./gradle-completion.bash $out/share/bash-completion/completions/gradle
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Gradle tab completion for bash and zsh";
|
||||
homepage = https://github.com/gradle/gradle-completion;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
@ -6040,6 +6040,8 @@ with pkgs;
|
||||
|
||||
bash-completion = callPackage ../shells/bash/bash-completion { };
|
||||
|
||||
gradle-completion = callPackage ../shells/zsh/gradle-completion { };
|
||||
|
||||
nix-bash-completions = callPackage ../shells/bash/nix-bash-completions { };
|
||||
|
||||
dash = callPackage ../shells/dash { };
|
||||
|
Loading…
Reference in New Issue
Block a user