3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/yarn/default.nix
2019-05-11 09:22:49 +02:00

29 lines
827 B
Nix

{ stdenv, nodejs, fetchzip }:
stdenv.mkDerivation rec {
pname = "yarn";
version = "1.16.0";
src = fetchzip {
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
sha256 = "1ki518ppw7bka4bfgvsv9s8x785vy23nvi7ihsw6ivisrg5v0w7w";
};
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 = with maintainers; [ offline screendriver ];
platforms = platforms.linux ++ platforms.darwin;
};
}