summary refs log tree commit diff
path: root/pkgs/shells/bash/yarn-completion/default.nix
blob: fabfc0a1ce23d3558352bc348d8331a8899622aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
}:

stdenv.mkDerivation rec {
  pname = "yarn-bash-completion";
  version = "0.17.0";

  src = fetchFromGitHub {
    owner = "dsifford";
    repo = "yarn-completion";
    rev = "v${version}";
    sha256 = "0xflbrbwskjqv3knvc8jqygpvfxh5ak66q7w22d1ng8gwrfqzcng";
  };

  nativeBuildInputs = [ installShellFiles ];

  installPhase = ''
    runHook preInstall

    installShellCompletion --cmd yarn ./yarn-completion.bash

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://github.com/dsifford/yarn-completion/";
    description = "Bash completion for Yarn";
    license = licenses.mit;
    maintainers = with maintainers; [ DamienCassou ];
  };
}