nixpkgs/pkgs/tools/networking/pgrok/web.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
588 B
Nix
Raw Normal View History

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