nixpkgs-suyu/pkgs/development/tools/yarn-berry/default.nix
Pyrox 8575645827 yarn-berry: 3.4.1 -> 4.0.1
The only breaking change here is that Yarn drops support for NodeJS versions <18.12

Besides that, no major changes that I think deserve a mention
2023-11-10 15:15:40 -08:00

43 lines
917 B
Nix

{ fetchFromGitHub, lib, nodejs, stdenv, yarn }:
stdenv.mkDerivation rec {
name = "yarn-berry";
version = "4.0.1";
src = fetchFromGitHub {
owner = "yarnpkg";
repo = "berry";
rev = "@yarnpkg/cli/${version}";
hash = "sha256-9QNeXamNqRx+Bfg8nAhnImPuNFyqrHIs1eF9prSwIR4=";
};
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
'';
meta = with lib; {
homepage = "https://yarnpkg.com/";
description = "Fast, reliable, and secure dependency management.";
license = licenses.bsd2;
maintainers = with maintainers; [ ryota-ka thehedgeh0g ];
platforms = platforms.unix;
};
}