1{
2 lib,
3 nodejs,
4 buildNpmPackage,
5 fetchFromGitHub,
6 unzip,
7 gauge-unwrapped,
8}:
9buildNpmPackage rec {
10 pname = "gauge-plugin-js";
11 version = "5.0.1";
12
13 src = fetchFromGitHub {
14 owner = "getgauge";
15 repo = "gauge-js";
16 rev = "v${version}";
17 hash = "sha256-eFXWed/2NQphSPuGIdnpq77ZiYPEGx5bS7g5LAZhkME=";
18 fetchSubmodules = true;
19 };
20
21 npmDepsHash = "sha256-LUwnue1kFxtifRrV8U+IQ74A2/ari75MVyZT0xLaez4=";
22 npmBuildScript = "package";
23
24 buildInputs = [ nodejs ];
25 nativeBuildInputs = [ unzip ];
26
27 postPatch = ''
28 patchShebangs index.js
29 '';
30
31 installPhase = ''
32 mkdir -p $out/share/gauge-plugins/js/${version}
33 unzip deploy/gauge-js-${version}.zip -d $out/share/gauge-plugins/js/${version}
34 '';
35
36 meta = {
37 description = "Gauge plugin that lets you write tests in JavaScript";
38 homepage = "https://github.com/getgauge/gauge-js/";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ marie ];
41 inherit (gauge-unwrapped.meta) platforms;
42 };
43}