@@ -0,0 +1,34 @@
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, installShellFiles
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "yarn-bash-completion";
9+ version = "0.17.0";
10+
11+ src = fetchFromGitHub {
12+ owner = "dsifford";
13+ repo = "yarn-completion";
14+ rev = "v${version}";
15+ sha256 = "0xflbrbwskjqv3knvc8jqygpvfxh5ak66q7w22d1ng8gwrfqzcng";
16+ };
17+
18+ nativeBuildInputs = [ installShellFiles ];
19+
20+ installPhase = ''
21+ runHook preInstall
22+
23+ installShellCompletion --cmd yarn ./yarn-completion.bash
24+
25+ runHook postInstall
26+ '';
27+
28+ meta = with lib; {
29+ homepage = "https://github.com/dsifford/yarn-completion/";
30+ description = "Bash completion for Yarn";
31+ license = licenses.mit;
32+ maintainers = with maintainers; [ DamienCassou ];
33+ };
34+}