summary refs log tree commit diff
path: root/pkgs/tools/networking/pgrok/web.nix
blob: f9b1485c20ae812bc6c9f7d1f6a8b975385653ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ buildNpmPackage
, src
, version
}:
buildNpmPackage {
    name = "pgrok-web";
    inherit src version;
    sourceRoot = "${src.name}/pgrokd/web";

    npmDepsHash = "sha256-f4pDBoG6sTJE3aUknqUvHHpBR9KWo/B4YMrWHkGbvA8=";

    # Upstream doesn't have a lockfile
    postPatch = ''
      cp ${./package-lock.json} ./package-lock.json
      substituteInPlace ./package.json \
        --replace "../cli/dist" "$out"
    '';

    patches = [
      ./add_version_to_package.json.patch
    ];

    dontInstall = true;
    dontFixup = true;

    NODE_OPTIONS = "--openssl-legacy-provider";

    npmPackFlags = [ "--ignore-scripts" ];
  }