mongosh: 2.5.2 -> 2.5.5

+14 -21
+6 -21
pkgs/by-name/mo/mongosh/package.nix
··· 2 lib, 3 buildNpmPackage, 4 fetchFromGitHub, 5 - testers, 6 - nix-update-script, 7 - fetchpatch, 8 }: 9 10 buildNpmPackage (finalAttrs: { 11 pname = "mongosh"; 12 - version = "2.5.2"; 13 14 src = fetchFromGitHub { 15 owner = "mongodb-js"; 16 repo = "mongosh"; 17 tag = "v${finalAttrs.version}"; 18 - hash = "sha256-0rol41XNdpfVRGY8KXFmQ0GHg5QqgnCaF21ZFyxfKeQ="; 19 }; 20 21 - npmDepsHash = "sha256-J4/CU+gdT/qecM1JwafLBewQjYdaONq/k4ax3Jw34XY="; 22 23 patches = [ 24 ./disable-telemetry.patch 25 - 26 - # For tagged version 2.5.2 27 - (fetchpatch { 28 - url = "https://github.com/mongodb-js/mongosh/commit/8e775b58b95f1d7c0a3de9c677e957a40213da6a.patch"; 29 - hash = "sha256-Q80QuzC7JN6uqyjk7YuUljXm+365AwYRV5cct9TefUc="; 30 - }) 31 ]; 32 33 npmFlags = [ ··· 45 ''; 46 47 passthru = { 48 - tests.version = testers.testVersion { 49 - package = finalAttrs.finalPackage; 50 - }; 51 - updateScript = nix-update-script { 52 - extraArgs = [ 53 - "--version-regex" 54 - "^v(\\d+\\.\\d+\\.\\d+)$" 55 - ]; 56 - }; 57 }; 58 59 meta = {
··· 2 lib, 3 buildNpmPackage, 4 fetchFromGitHub, 5 }: 6 7 buildNpmPackage (finalAttrs: { 8 pname = "mongosh"; 9 + version = "2.5.5"; 10 11 src = fetchFromGitHub { 12 owner = "mongodb-js"; 13 repo = "mongosh"; 14 tag = "v${finalAttrs.version}"; 15 + hash = "sha256-dngguv/ShxwfFpbYyyfJ1SmQhSgEsDOKcRSXdjsfcmo="; 16 }; 17 18 + npmDepsHash = "sha256-W5qq3XUV+x0Ko1Ftp2JTHbaOSGsSG5a7qABthtnaU4o="; 19 20 patches = [ 21 ./disable-telemetry.patch 22 ]; 23 24 npmFlags = [ ··· 36 ''; 37 38 passthru = { 39 + # Version testing is skipped because upstream often forgets to update the version. 40 + 41 + updateScript = ./update.sh; 42 }; 43 44 meta = {
+8
pkgs/by-name/mo/mongosh/update.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl nix-update jq 3 + 4 + # GitHub tags include many unrelated subpackage versions, making it unreliable to determine the latest mongosh version. 5 + # Fetch the latest mongosh version directly from the npm registry instead. 6 + version="$(curl -fsSL https://registry.npmjs.org/mongosh/latest | jq -r ".version")" 7 + 8 + nix-update --version "$version" mongosh