2023-09-24 18:23:54 +00:00
|
|
|
{ src
|
2023-08-22 17:36:10 +00:00
|
|
|
, version
|
2023-09-24 18:23:54 +00:00
|
|
|
, nodejs
|
|
|
|
, nodePackages
|
|
|
|
, stdenvNoCC
|
2023-08-22 17:36:10 +00:00
|
|
|
}:
|
2023-09-24 18:23:54 +00:00
|
|
|
let
|
|
|
|
build-deps = nodePackages."pgrok-build-deps-../../tools/networking/pgrok/build-deps";
|
|
|
|
in
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
pname = "pgrok-web";
|
|
|
|
inherit version;
|
|
|
|
src = "${src}/pgrokd/web";
|
2023-08-22 17:36:10 +00:00
|
|
|
|
2023-09-24 18:23:54 +00:00
|
|
|
nativeBuildInputs = [ nodejs ];
|
2023-08-22 17:36:10 +00:00
|
|
|
|
2023-09-24 18:23:54 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
cp ${./build-deps/package.json} package.json
|
|
|
|
ln -s ${build-deps}/lib/node_modules/pgrokd/node_modules node_modules
|
|
|
|
npm run build
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2023-08-22 17:36:10 +00:00
|
|
|
|
2023-09-24 18:23:54 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
cp -r dist $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|