about summary refs log tree commit diff
path: root/pkgs/development/tools/web-ext
diff options
context:
space:
mode:
authorVictor Engmark <victor@engmark.name>2023-12-09 21:01:08 +1300
committerVictor Engmark <victor@engmark.name>2023-12-11 15:37:56 +1300
commitf66cb20232b52bc40cb7b5d1e97f3e40b09181a3 (patch)
tree3683fa5e07b6ad59ada3f6f2155ed8454bc57887 /pkgs/development/tools/web-ext
parent2f878b30c5fd9956daee4c1fbe4d851677c47b3e (diff)
web-ext: Include only production dependencies in build
Closes #273083.
Diffstat (limited to 'pkgs/development/tools/web-ext')
-rw-r--r--pkgs/development/tools/web-ext/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/tools/web-ext/default.nix b/pkgs/development/tools/web-ext/default.nix
index acadcd94b57f4..494eee2e6a963 100644
--- a/pkgs/development/tools/web-ext/default.nix
+++ b/pkgs/development/tools/web-ext/default.nix
@@ -1,6 +1,8 @@
 { lib
 , buildNpmPackage
 , fetchFromGitHub
+, runCommand
+, web-ext
 }:
 
 buildNpmPackage rec {
@@ -16,6 +18,13 @@ buildNpmPackage rec {
 
   npmDepsHash = "sha256-KPBKUjCxva11w/E+Qhlx+1vikpCL7Hr9MiKenYHEVSU=";
 
+  npmBuildFlags = [ "--production" ];
+
+  passthru.tests.help = runCommand "${pname}-tests" { } ''
+    ${web-ext}/bin/web-ext --help
+    touch $out
+  '';
+
   meta = {
     description = "A command line tool to help build, run, and test web extensions";
     homepage = "https://github.com/mozilla/web-ext";