summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorNick Novitski <github@nicknovitski.com>2018-07-26 10:15:56 -0700
committerNick Novitski <nick@expo.io>2018-07-31 15:57:37 -0700
commit7fd0d020a559780d881ca46de336ab4a789c9f0f (patch)
tree8a3d990a4d338b3e90b602b52a3e63049e67d4de /pkgs/development/tools
parent0f70e78d377954c689f13e6f14047cf9c1ed9596 (diff)
downloadnixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar.gz
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar.bz2
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar.lz
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar.xz
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.tar.zst
nixlib-7fd0d020a559780d881ca46de336ab4a789c9f0f.zip
yarn: add yarnpkg bin alias output
Because the hadoop project also provides a binary `yarn`, the yarn project [added this alias to help people with both hadoop and yarn installed](https://github.com/yarnpkg/yarn/issues/673#issuecomment-254004512).  Some scripts in the wild use this alias for the same reason.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/yarn/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/tools/yarn/default.nix b/pkgs/development/tools/yarn/default.nix
index f1336b89194e..bf8dbf671c01 100644
--- a/pkgs/development/tools/yarn/default.nix
+++ b/pkgs/development/tools/yarn/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, nodejs, fetchzip, makeWrapper }:
+{ stdenv, nodejs, fetchzip }:
 
 stdenv.mkDerivation rec {
   name = "yarn-${version}";
@@ -9,12 +9,13 @@ stdenv.mkDerivation rec {
     sha256 = "0bk006zs1bk6nwj9x07ry314fgxi21sk79h1paljbs6yzrv62h4g";
   };
 
-  buildInputs = [ makeWrapper nodejs ];
+  buildInputs = [ nodejs ];
 
   installPhase = ''
     mkdir -p $out/{bin,libexec/yarn/}
     cp -R . $out/libexec/yarn
-    makeWrapper $out/libexec/yarn/bin/yarn.js $out/bin/yarn
+    ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn
+    ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg
   '';
 
   meta = with stdenv.lib; {