mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
29 lines
829 B
Nix
29 lines
829 B
Nix
{ stdenv, nodejs, fetchzip }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "yarn";
|
|
version = "1.22.2";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
|
|
sha256 = "1av52k5hl7xylxz5c0h64akz6ccd1vm64v0pzmny1661pbihiwp5";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|