btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / we / web-ext / package.nix
blob5789d1e11ee2cd008f595893f69dc22af261b836
1 { lib
2 , buildNpmPackage
3 , fetchFromGitHub
4 , runCommand
5 , web-ext
6 }:
8 buildNpmPackage rec {
9   pname = "web-ext";
10   version = "8.3.0";
12   src = fetchFromGitHub {
13     owner = "mozilla";
14     repo = "web-ext";
15     rev = version;
16     hash = "sha256-Jlxfsyir1+vutfuHt6SxBkcn0PTtr9/cZzEGa6z6LU0=";
17   };
19   npmDepsHash = "sha256-MCK1bCWZpUk2Z/+ZWsY+iUCpz+n1UEcBqkAtiBtJl0k=";
21   npmBuildFlags = [ "--production" ];
23   passthru.tests.help = runCommand "${pname}-tests" { } ''
24     ${web-ext}/bin/web-ext --help
25     touch $out
26   '';
28   meta = {
29     description = "Command line tool to help build, run, and test web extensions";
30     homepage = "https://github.com/mozilla/web-ext";
31     license = lib.licenses.mpl20;
32     mainProgram = "web-ext";
33     maintainers = [ ];
34   };