Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle-completion: modernize, add update script #354145

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pkgs/by-name/gr/gradle-completion/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
installShellFiles,
gitUpdater,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gradle-completion";
version = "1.4.1";

src = fetchFromGitHub {
owner = "gradle";
repo = "gradle-completion";
rev = "v${finalAttrs.version}";
sha256 = "15b0692i3h8h7b95465b2aw9qf5qjmjag5n62347l8yl7zbhv3l2";
};

nativeBuildInputs = [
installShellFiles
];

strictDeps = true;

# we just move two files into $out,
# this shouldn't bother Hydra.
preferLocalBuild = true;

dontBuild = true;

installPhase = ''
runHook preInstall
# We must specify --name explicitly,
# otherwise bash completions end up
# at .../completions/gradle-completion.bash,
# not .../completions/gradle.bash
installShellCompletion --name gradle \
--bash gradle-completion.bash \
--zsh _gradle
runHook postInstall
'';

passthru.updateScript = gitUpdater {
rev-prefix = "v";
};

meta = {
description = "Gradle tab completion for bash and zsh";
homepage = "https://github.com/gradle/gradle-completion";
license = lib.licenses.mit;
maintainers = [ ];
};
})
37 changes: 0 additions & 37 deletions pkgs/shells/zsh/gradle-completion/default.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14044,8 +14044,6 @@ 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 { };

yarn-bash-completion = callPackage ../shells/bash/yarn-completion { };
Expand Down