depot/third_party/nixpkgs/pkgs/tools/networking/pgrok/web.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

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
'';
}