Files
nixpkgs/pkgs/by-name/mo/mongosh/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.2 KiB
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "mongosh";
version = "2.5.8";
src = fetchFromGitHub {
owner = "mongodb-js";
repo = "mongosh";
tag = "v${finalAttrs.version}";
hash = "sha256-VQJkhaPXy2Mg9uoV6qKFzACtJ6TMDWZj52wUvP/7SLg=";
};
npmDepsHash = "sha256-BnuzrIS/RtKReTPrSY/yQ5LRmA3PIGkv80rS+6IJZxQ=";
patches = [
./disable-telemetry.patch
];
npmFlags = [
"--omit=optional"
"--ignore-scripts"
];
npmBuildScript = "compile";
dontNpmInstall = true;
installPhase = ''
runHook preInstall
npmWorkspace=packages/mongosh npmInstallHook
cp -r packages configs $out/lib/node_modules/mongosh/
rm $out/lib/node_modules/mongosh/node_modules/@mongosh/docker-build-scripts # dangling symlink
runHook postInstall
'';
passthru = {
# Version testing is skipped because upstream often forgets to update the version.
updateScript = ./update.sh;
};
meta = {
homepage = "https://www.mongodb.com/try/download/shell";
description = "MongoDB Shell";
maintainers = with lib.maintainers; [ aaronjheng ];
license = lib.licenses.asl20;
mainProgram = "mongosh";
};
})