diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-01-27 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2023-01-27 04:20:00 +0000 |
commit | 0e6e5de21e2ee9f47b53cd5e4c492e74a2300d28 (patch) | |
tree | a1ad49cdc8cd9b76dd449e9dd3c00c27351e4e90 /pkgs/development/tools/yarn | |
parent | 8d6a0e96583ca8fa13ae983406753acfb3c52755 (diff) |
yarn: install bash completions
Diffstat (limited to 'pkgs/development/tools/yarn')
-rw-r--r-- | pkgs/development/tools/yarn/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/development/tools/yarn/default.nix b/pkgs/development/tools/yarn/default.nix index b3bc6bc62b95b..9bd4c3c3a24a3 100644 --- a/pkgs/development/tools/yarn/default.nix +++ b/pkgs/development/tools/yarn/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, nodejs, fetchzip, testers, yarn }: +{ lib, stdenv, nodejs, fetchFromGitHub, fetchzip, testers, yarn }: +let + completion = fetchFromGitHub { + owner = "dsifford"; + repo = "yarn-completion"; + rev = "v0.17.0"; + hash = "sha256-z7KPXeYPPRuaEPxgY6YqsLt9n8cSsW3n2FhOzVde1HU="; + }; +in stdenv.mkDerivation rec { pname = "yarn"; version = "1.22.19"; @@ -12,10 +20,11 @@ stdenv.mkDerivation rec { buildInputs = [ nodejs ]; installPhase = '' - mkdir -p $out/{bin,libexec/yarn/} + mkdir -p $out/{bin,libexec/yarn/,share/bash-completion/completions/} cp -R . $out/libexec/yarn ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg + ln -s ${completion}/yarn-completion.bash $out/share/bash-completion/completions/yarn.bash ''; passthru.tests = testers.testVersion { package = yarn; }; |