5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
30 lines
588 B
Nix
30 lines
588 B
Nix
{ src
|
|
, version
|
|
, nodejs
|
|
, nodePackages
|
|
, stdenvNoCC
|
|
}:
|
|
let
|
|
build-deps = nodePackages."pgrok-build-deps-../../tools/networking/pgrok/build-deps";
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "pgrok-web";
|
|
inherit version;
|
|
src = "${src}/pgrokd/web";
|
|
|
|
nativeBuildInputs = [ nodejs ];
|
|
|
|
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
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
cp -r dist $out
|
|
runHook postInstall
|
|
'';
|
|
}
|