depot/third_party/nixpkgs/pkgs/development/tools/yarn-berry/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

46 lines
999 B
Nix

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