2023-02-05 07:41:17 +00:00
|
|
|
{ fetchFromGitHub, lib, nodejs, stdenv, yarn }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yarn-berry";
|
2023-11-10 17:32:30 +00:00
|
|
|
version = "4.0.1";
|
2023-02-05 07:41:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yarnpkg";
|
|
|
|
repo = "berry";
|
|
|
|
rev = "@yarnpkg/cli/${version}";
|
2023-11-10 17:32:30 +00:00
|
|
|
hash = "sha256-9QNeXamNqRx+Bfg8nAhnImPuNFyqrHIs1eF9prSwIR4=";
|
2023-02-05 07:41:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
nodejs
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
yarn
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
yarn workspace @yarnpkg/cli build:cli
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm 755 ./packages/yarnpkg-cli/bundles/yarn.js "$out/bin/yarn"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-11-10 17:32:30 +00:00
|
|
|
meta = with lib; {
|
2023-02-05 07:41:17 +00:00
|
|
|
homepage = "https://yarnpkg.com/";
|
|
|
|
description = "Fast, reliable, and secure dependency management.";
|
|
|
|
license = licenses.bsd2;
|
2023-11-10 17:32:30 +00:00
|
|
|
maintainers = with maintainers; [ ryota-ka thehedgeh0g ];
|
2023-02-05 07:41:17 +00:00
|
|
|
platforms = platforms.unix;
|
2023-12-08 15:49:59 +00:00
|
|
|
mainProgram = "yarn";
|
2023-02-05 07:41:17 +00:00
|
|
|
};
|
|
|
|
}
|