depot/third_party/nixpkgs/pkgs/development/tools/web-ext/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

35 lines
762 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, runCommand
, web-ext
}:
buildNpmPackage rec {
pname = "web-ext";
version = "8.3.0";
src = fetchFromGitHub {
owner = "mozilla";
repo = "web-ext";
rev = version;
hash = "sha256-Jlxfsyir1+vutfuHt6SxBkcn0PTtr9/cZzEGa6z6LU0=";
};
npmDepsHash = "sha256-MCK1bCWZpUk2Z/+ZWsY+iUCpz+n1UEcBqkAtiBtJl0k=";
npmBuildFlags = [ "--production" ];
passthru.tests.help = runCommand "${pname}-tests" { } ''
${web-ext}/bin/web-ext --help
touch $out
'';
meta = {
description = "Command line tool to help build, run, and test web extensions";
homepage = "https://github.com/mozilla/web-ext";
license = lib.licenses.mpl20;
mainProgram = "web-ext";
maintainers = [ ];
};
}