nixpkgs/pkgs/development/tools/yarn/default.nix
2019-11-29 16:38:59 -08:00

28 lines
827 B
Nix

{ stdenv, nodejs, fetchzip }:
stdenv.mkDerivation rec {
pname = "yarn";
version = "1.19.2";
src = fetchzip {
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
sha256 = "05sjf7pgdj3hh92j2xxl683frrkiw1rqxs72z3an4gb83nllvi0n";
};
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;
};
}