about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyota Kameoka <ok@ryota-ka.me>2023-02-05 16:41:17 +0900
committerSandro Jäckel <sandro.jaeckel@gmail.com>2023-07-24 00:15:48 +0200
commit26248c58506ff638b771f618269c4676aa6fe613 (patch)
tree9aee185148fee4e03e383cbcec827ea508accc15
parentff13fe9f6cec2893ea7812a07541759262fe3282 (diff)
yarn-berry: init at 3.4.1
-rw-r--r--pkgs/development/tools/yarn-berry/default.nix43
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/tools/yarn-berry/default.nix b/pkgs/development/tools/yarn-berry/default.nix
new file mode 100644
index 0000000000000..b8181e812fc2e
--- /dev/null
+++ b/pkgs/development/tools/yarn-berry/default.nix
@@ -0,0 +1,43 @@
+{ fetchFromGitHub, lib, nodejs, stdenv, yarn }:
+
+stdenv.mkDerivation rec {
+  name = "yarn-berry";
+  version = "3.4.1";
+
+  src = fetchFromGitHub {
+    owner = "yarnpkg";
+    repo = "berry";
+    rev = "@yarnpkg/cli/${version}";
+    hash = "sha256-eBBB/F+mnGi93Qf23xgt306/ogoV76RXOM90O14u5Tw=";
+  };
+
+  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 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 29b02a714f170..a4195dab32373 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13592,6 +13592,8 @@ with pkgs;
 
   yarn = callPackage ../development/tools/yarn  { };
 
+  yarn-berry = callPackage ../development/tools/yarn-berry { };
+
   yarn2nix-moretea = callPackage ../development/tools/yarn2nix-moretea/yarn2nix { pkgs = pkgs.__splicedPackages; };
 
   inherit (yarn2nix-moretea)