mongosh: 2.5.2 -> 2.5.5
This commit is contained in:
@@ -2,32 +2,23 @@
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
nix-update-script,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "mongosh";
|
||||
version = "2.5.2";
|
||||
version = "2.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mongodb-js";
|
||||
repo = "mongosh";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-0rol41XNdpfVRGY8KXFmQ0GHg5QqgnCaF21ZFyxfKeQ=";
|
||||
hash = "sha256-dngguv/ShxwfFpbYyyfJ1SmQhSgEsDOKcRSXdjsfcmo=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-J4/CU+gdT/qecM1JwafLBewQjYdaONq/k4ax3Jw34XY=";
|
||||
npmDepsHash = "sha256-W5qq3XUV+x0Ko1Ftp2JTHbaOSGsSG5a7qABthtnaU4o=";
|
||||
|
||||
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=";
|
||||
})
|
||||
];
|
||||
|
||||
npmFlags = [
|
||||
@@ -45,15 +36,9 @@ buildNpmPackage (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = finalAttrs.finalPackage;
|
||||
};
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^v(\\d+\\.\\d+\\.\\d+)$"
|
||||
];
|
||||
};
|
||||
# Version testing is skipped because upstream often forgets to update the version.
|
||||
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl nix-update jq
|
||||
|
||||
# GitHub tags include many unrelated subpackage versions, making it unreliable to determine the latest mongosh version.
|
||||
# Fetch the latest mongosh version directly from the npm registry instead.
|
||||
version="$(curl -fsSL https://registry.npmjs.org/mongosh/latest | jq -r ".version")"
|
||||
|
||||
nix-update --version "$version" mongosh
|
||||
Reference in New Issue
Block a user