gaugePlugins.js: init at 4.0.1

This commit is contained in:
Marie Ramlow 2024-03-12 12:47:47 +01:00 committed by Yaya
parent d327c365e0
commit 1f4801e4ad
2 changed files with 43 additions and 0 deletions

View File

@ -6,5 +6,6 @@ in {
dotnet = callPackage ./dotnet { };
html-report = callPackage ./html-report { };
java = callPackage ./java { };
js = callPackage ./js { };
ruby = callPackage ./ruby { };
})

View File

@ -0,0 +1,42 @@
{ lib
, nodejs
, buildNpmPackage
, fetchFromGitHub
, unzip
, gauge-unwrapped
}:
buildNpmPackage rec {
pname = "gauge-plugin-js";
version = "4.0.1";
src = fetchFromGitHub {
owner = "getgauge";
repo = "gauge-js";
rev = "v${version}";
hash = "sha256-qCn4EKndd0eM3X0+aLrCwvmEG5fgUfpVm76cg/n7B84=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-5XkFwCFqNMe5xc/Tx69uUV7KMtgY7Z3zE7hbtxYqRf0=";
npmBuildScript = "package";
buildInputs = [ nodejs ];
nativeBuildInputs = [ unzip ];
postPatch = ''
patchShebangs index.js
'';
installPhase = ''
mkdir -p $out/share/gauge-plugins/js/${version}
unzip deploy/gauge-js-${version}.zip -d $out/share/gauge-plugins/js/${version}
'';
meta = {
description = "Gauge plugin that lets you write tests in JavaScript";
homepage = "https://github.com/getgauge/gauge-js/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ marie ];
inherit (gauge-unwrapped.meta) platforms;
};
}