nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 pname = "gradle-completion";
5 version = "1.4.1";
6
7 src = fetchFromGitHub {
8 owner = "gradle";
9 repo = "gradle-completion";
10 rev = "v${version}";
11 sha256 = "15b0692i3h8h7b95465b2aw9qf5qjmjag5n62347l8yl7zbhv3l2";
12 };
13
14 strictDeps = true;
15
16 # we just move two files into $out,
17 # this shouldn't bother Hydra.
18 preferLocalBuild = true;
19
20 dontBuild = true;
21 installPhase = ''
22 runHook preInstall
23
24 mkdir -p $out
25 install -Dm0644 ./_gradle $out/share/zsh/site-functions/_gradle
26 install -Dm0644 ./gradle-completion.bash $out/share/bash-completion/completions/gradle
27
28 runHook postInstall
29 '';
30
31 meta = with lib; {
32 description = "Gradle tab completion for bash and zsh";
33 homepage = "https://github.com/gradle/gradle-completion";
34 license = licenses.mit;
35 maintainers = [ ];
36 };
37}