diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/mongosh/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/mongosh/default.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/mongosh/default.nix b/nixpkgs/pkgs/development/tools/mongosh/default.nix new file mode 100644 index 000000000000..56e2e2e8e421 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/mongosh/default.nix @@ -0,0 +1,44 @@ +{ 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"; + }; +} |