2023-02-21 09:45:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchurl
|
|
|
|
, testers
|
|
|
|
, mongosh
|
|
|
|
}:
|
2022-02-26 08:24:49 +00:00
|
|
|
|
|
|
|
let
|
2023-05-05 19:39:20 +00:00
|
|
|
source = lib.importJSON ./source.json;
|
2022-02-26 08:24:49 +00:00
|
|
|
in
|
2023-02-21 09:45:43 +00:00
|
|
|
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;
|
2022-02-26 08:24:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.mongodb.com/try/download/shell";
|
|
|
|
description = "The MongoDB Shell";
|
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
mainProgram = "mongosh";
|
|
|
|
};
|
|
|
|
}
|