depot/pkgs/by-name/mo/mongosh/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

44 lines
851 B
Nix

{ lib
, buildNpmPackage
, fetchurl
, testers
, mongosh
}:
let
source = lib.importJSON ./source.json;
in
buildNpmPackage {
pname = "mongosh";
inherit (source) version;
src = fetchurl {
url = "https://registry.npmjs.org/mongosh/-/${source.filename}";
hash = source.integrity;
};
postPatch = ''
ln -s ${./package-lock.json} package-lock.json
'';
npmDepsHash = source.deps;
makeCacheWritable = true;
dontNpmBuild = true;
npmFlags = [ "--omit=optional" ];
passthru = {
tests.version = testers.testVersion {
package = mongosh;
};
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";
};
}