Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodePackages.karma: use buildNpmPackage #246145

Merged
merged 2 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ mapAliases {
eslint_d = pkgs.eslint_d; # Added 2023-05-26
flood = pkgs.flood; # Added 2023-07-25
gtop = pkgs.gtop; # added 2023-07-31
karma = pkgs.karma-runner; # added 2023-07-29
manta = pkgs.node-manta; # Added 2023-05-06
readability-cli = pkgs.readability-cli; # Added 2023-06-12
reveal-md = pkgs.reveal-md; # added 2023-07-31
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@
, "jsonplaceholder"
, "kaput-cli"
, "katex"
, "karma"
, "keyoxide"
, "lcov-result-merger"
, "leetcode-cli"
Expand Down
179 changes: 0 additions & 179 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions pkgs/development/tools/karma-runner/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
pname = "karma";
version = "6.4.2";

src = fetchFromGitHub {
owner = "karma-runner";
repo = "karma";
rev = "v${version}";
hash = "sha256-v6IiLz65NS8GwM/FPqRxR5qcFDDu7EqloR0SIensdDI=";
};

patches = [
./fix-package-lock.patch
];

npmDepsHash = "sha256-nX4/96WdPEDZ6DASp+AOBbBbHyq+p2zIh2dZUbtmIPI=";

env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;

meta = {
description = "Spectacular Test Runner for JavaScript";
homepage = "http://karma-runner.github.io/";
license = lib.licenses.mit;
mainProgram = "karma";
maintainers = with lib.maintainers; [ ];
};
}
53 changes: 53 additions & 0 deletions pkgs/development/tools/karma-runner/fix-package-lock.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff --git a/package-lock.json b/package-lock.json
index 413cf4d1..1d03d9f5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5226,36 +5226,6 @@
"integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==",
"dev": true
},
- "karma": {
- "version": "file:",
- "dev": true,
- "requires": {
- "@colors/colors": "1.5.0",
- "body-parser": "^1.19.0",
- "braces": "^3.0.2",
- "chokidar": "^3.5.1",
- "connect": "^3.7.0",
- "di": "^0.0.1",
- "dom-serialize": "^2.2.1",
- "glob": "^7.1.7",
- "graceful-fs": "^4.2.6",
- "http-proxy": "^1.18.1",
- "isbinaryfile": "^4.0.8",
- "lodash": "^4.17.21",
- "log4js": "^6.4.1",
- "mime": "^2.5.2",
- "minimatch": "^3.0.4",
- "mkdirp": "^0.5.5",
- "qjobs": "^1.2.0",
- "range-parser": "^1.2.1",
- "rimraf": "^3.0.2",
- "socket.io": "^4.4.1",
- "source-map": "^0.6.1",
- "tmp": "^0.2.1",
- "ua-parser-js": "^0.7.30",
- "yargs": "^16.1.1"
- }
- },
"karma-browserify": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/karma-browserify/-/karma-browserify-7.0.0.tgz",
diff --git a/package.json b/package.json
index 347d9e95..90f6d036 100644
--- a/package.json
+++ b/package.json
@@ -471,7 +471,6 @@
"eslint-plugin-standard": "^4.0.1",
"http2": "^3.3.6",
"jasmine-core": "^3.6.0",
- "karma": ".",
"karma-browserify": "^7.0.0",
"karma-browserstack-launcher": "^1.6.0",
"karma-chai": "^0.1.0",
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18188,6 +18188,8 @@ with pkgs;

espup = callPackage ../development/tools/espup { };

karma-runner = callPackage ../development/tools/karma-runner { };

phpunit = callPackage ../development/tools/misc/phpunit { };

teller = callPackage ../development/tools/teller { };
Expand Down