nixpkgs-suyu/pkgs/development/tools/yarn/default.nix
2017-03-07 16:25:09 +00:00

26 lines
737 B
Nix

{ stdenv, nodejs, fetchzip, makeWrapper }:
stdenv.mkDerivation rec {
name = "yarn-${version}";
version = "0.22.0";
src = fetchzip {
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
sha256 = "1hs4fqjj9rg47ipcagpdk3grh7aa0ls3vsxq4q20d5hb43s9n5gs";
};
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 ];
};
}