2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, nodejs, fetchzip, testVersion, yarn }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yarn";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.22.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-gI4v/WPWrNa2i2oct8Ns7bpDzmDCy+c86pGKpNznhh0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.tests = testVersion { package = yarn; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|