2023-09-24 20:23:54 +02:00
|
|
|
{ src
|
2023-08-22 19:36:10 +02:00
|
|
|
, version
|
2023-09-24 20:23:54 +02:00
|
|
|
, nodejs
|
|
|
|
, nodePackages
|
|
|
|
, stdenvNoCC
|
2023-08-22 19:36:10 +02:00
|
|
|
}:
|
2023-09-24 20:23:54 +02: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 19:36:10 +02:00
|
|
|
|
2023-09-24 20:23:54 +02:00
|
|
|
nativeBuildInputs = [ nodejs ];
|
2023-08-22 19:36:10 +02:00
|
|
|
|
2023-09-24 20:23:54 +02: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 19:36:10 +02:00
|
|
|
|
2023-09-24 20:23:54 +02:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
cp -r dist $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|