mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
31 lines
588 B
Nix
31 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
|
|
'';
|
|
}
|