Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildNpmPackage 3, fetchurl 4, testers 5, mongosh 6}: 7 8let 9 source = lib.importJSON ./source.json; 10in 11buildNpmPackage { 12 pname = "mongosh"; 13 inherit (source) version; 14 15 src = fetchurl { 16 url = "https://registry.npmjs.org/mongosh/-/${source.filename}"; 17 hash = source.integrity; 18 }; 19 20 postPatch = '' 21 ln -s ${./package-lock.json} package-lock.json 22 ''; 23 24 npmDepsHash = source.deps; 25 26 makeCacheWritable = true; 27 dontNpmBuild = true; 28 npmFlags = [ "--omit=optional" ]; 29 30 passthru = { 31 tests.version = testers.testVersion { 32 package = mongosh; 33 }; 34 updateScript = ./update.sh; 35 }; 36 37 meta = with lib; { 38 homepage = "https://www.mongodb.com/try/download/shell"; 39 description = "The MongoDB Shell"; 40 maintainers = with maintainers; [ aaronjheng ]; 41 license = licenses.asl20; 42 mainProgram = "mongosh"; 43 }; 44}