mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 15:11:35 +00:00
7fd0d020a5
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.
28 lines
764 B
Nix
28 lines
764 B
Nix
{ stdenv, nodejs, fetchzip }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "yarn-${version}";
|
|
version = "1.9.2";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
|
|
sha256 = "0bk006zs1bk6nwj9x07ry314fgxi21sk79h1paljbs6yzrv62h4g";
|
|
};
|
|
|
|
buildInputs = [ nodejs ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/{bin,libexec/yarn/}
|
|
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
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://yarnpkg.com/;
|
|
description = "Fast, reliable, and secure dependency management for javascript";
|
|
license = licenses.bsd2;
|
|
maintainers = [ maintainers.offline ];
|
|
};
|
|
}
|