2017-01-14 20:49:57 +01:00
|
|
|
{ stdenv, nodejs, fetchzip, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yarn-${version}";
|
2018-06-13 13:09:56 +02:00
|
|
|
version = "1.8.0";
|
2017-01-14 20:49:57 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
|
2018-06-13 13:09:56 +02:00
|
|
|
sha256 = "145z9i935kab5pv3pldgs3b1i9ppplc928c71c2lbz8my1z6j77w";
|
2017-01-14 20:49:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [makeWrapper nodejs];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,libexec/yarn/}
|
|
|
|
cp -R . $out/libexec/yarn
|
|
|
|
makeWrapper $out/libexec/yarn/bin/yarn.js $out/bin/yarn
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://yarnpkg.com/;
|
|
|
|
description = "Fast, reliable, and secure dependency management for javascript";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.offline ];
|
|
|
|
};
|
|
|
|
}
|