Files
nixpkgs/pkgs/by-name/ga/gauge/plugins/js/default.nix
2026-06-15 22:15:53 +00:00

44 lines
985 B
Nix

{
lib,
nodejs,
buildNpmPackage,
fetchFromGitHub,
unzip,
gauge-unwrapped,
}:
buildNpmPackage rec {
pname = "gauge-plugin-js";
version = "5.0.6";
src = fetchFromGitHub {
owner = "getgauge";
repo = "gauge-js";
rev = "v${version}";
hash = "sha256-/hfsBoZ37A4W3uejmOnl6nZv0oCedkQFMNidqWb9DN8=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-2kZDpRUegHqZOEc49h3+RRAbKroW7v63bXjzDAu/bCc=";
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 = [ ];
inherit (gauge-unwrapped.meta) platforms;
};
}