nixpkgs/pkgs/development/tools/web-ext/default.nix
2023-12-11 15:37:56 +13:00

35 lines
786 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, runCommand
, web-ext
}:
buildNpmPackage rec {
pname = "web-ext";
version = "7.6.2";
src = fetchFromGitHub {
owner = "mozilla";
repo = "web-ext";
rev = version;
hash = "sha256-tFMngcoHFA3QmR0AK68elUVpli37PsVlcL978o7DQCs=";
};
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";
license = lib.licenses.mpl20;
mainProgram = "web-ext";
maintainers = with lib.maintainers; [ ];
};
}