depot/third_party/nixpkgs/pkgs/development/tools/mongosh/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

44 lines
857 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 = with lib; {
homepage = "https://www.mongodb.com/try/download/shell";
description = "The MongoDB Shell";
maintainers = with maintainers; [ aaronjheng ];
license = licenses.asl20;
mainProgram = "mongosh";
};
}