From d758a5b7ea32e82e667b1d6cb02249eec582e82c Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Sun, 18 May 2025 18:00:06 +0800 Subject: [PATCH] mongosh: 2.5.1 -> 2.5.2 --- pkgs/by-name/mo/mongosh/package.nix | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/mo/mongosh/package.nix b/pkgs/by-name/mo/mongosh/package.nix index e091666233c0..abf498209599 100644 --- a/pkgs/by-name/mo/mongosh/package.nix +++ b/pkgs/by-name/mo/mongosh/package.nix @@ -2,39 +2,34 @@ lib, buildNpmPackage, fetchFromGitHub, - fetchpatch, - libmongocrypt, - krb5, testers, nix-update-script, + fetchpatch, }: buildNpmPackage (finalAttrs: { pname = "mongosh"; - version = "2.5.1"; + version = "2.5.2"; src = fetchFromGitHub { owner = "mongodb-js"; repo = "mongosh"; - - # Tracking a few commits ahead of 2.5.1 to ensure the package-lock.json patch below applies - #tag = "v${finalAttrs.version}"; - rev = "2163e8b10a77af18e0cedfa164526506c051593e"; - - hash = "sha256-DYX8NqAISwzBpdilcv3YVrL72byXMeC4z/nLqd2nf2c="; + tag = "v${finalAttrs.version}"; + hash = "sha256-0rol41XNdpfVRGY8KXFmQ0GHg5QqgnCaF21ZFyxfKeQ="; }; - patches = [ - # https://github.com/mongodb-js/mongosh/pull/2452 - (fetchpatch { - url = "https://github.com/mongodb-js/mongosh/commit/30f66260fce3e1744298d086bd2b54b2d2bfffbb.patch"; - hash = "sha256-c2QM/toeoagfhvuh4r+/5j7ZyV6DEr9brA9mXpEy1kM="; - }) + npmDepsHash = "sha256-J4/CU+gdT/qecM1JwafLBewQjYdaONq/k4ax3Jw34XY="; + patches = [ ./disable-telemetry.patch + + # For tagged version 2.5.2 + (fetchpatch { + url = "https://github.com/mongodb-js/mongosh/commit/8e775b58b95f1d7c0a3de9c677e957a40213da6a.patch"; + hash = "sha256-Q80QuzC7JN6uqyjk7YuUljXm+365AwYRV5cct9TefUc="; + }) ]; - npmDepsHash = "sha256-6uXEKAAGXxaODjXIszYml5Af4zSuEzy/QKdMgSzLD84="; npmFlags = [ "--omit=optional" "--ignore-scripts" @@ -53,7 +48,12 @@ buildNpmPackage (finalAttrs: { tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; - updateScript = nix-update-script { }; + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^v(\\d+\\.\\d+\\.\\d+)$" + ]; + }; }; meta = {