nixpkgs/pkgs/by-name/mo/mongosh/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
851 B
Nix
Raw Normal View History

{ lib
, buildNpmPackage
, fetchurl
, testers
, mongosh
}:
2022-02-26 08:24:49 +00:00
let
source = lib.importJSON ./source.json;
2022-02-26 08:24:49 +00:00
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;
2022-02-26 08:24:49 +00:00
};
2024-11-01 11:47:53 +00:00
meta = {
2022-02-26 08:24:49 +00:00
homepage = "https://www.mongodb.com/try/download/shell";
description = "MongoDB Shell";
2024-11-01 11:47:53 +00:00
maintainers = with lib.maintainers; [ aaronjheng ];
license = lib.licenses.asl20;
2022-02-26 08:24:49 +00:00
mainProgram = "mongosh";
};
}