open5gs{,-webui}: fix webui

As it is now, the built webui won’t work since to be able to start
it, it needs node_modules and the .next directory. Restore the normal
NPM installPhase which will copy all the necessary files.

The webui isn’t used during the main open5gs build, so move it to
its own separate package.

+13 -20
+13
pkgs/by-name/op/open5gs-webui/package.nix
···
··· 1 + { 2 + buildNpmPackage, 3 + open5gs, 4 + }: 5 + 6 + buildNpmPackage (finalAttrs: { 7 + pname = "${open5gs.pname}-webui"; 8 + inherit (open5gs) src version meta; 9 + 10 + sourceRoot = "${finalAttrs.src.name}/webui"; 11 + 12 + npmDepsHash = "sha256-IpqineYa15GBqoPDJ7RpaDsq+MQIIDcdq7yhwmH4Lzo="; 13 + })
-20
pkgs/by-name/op/open5gs/package.nix
··· 1 { 2 stdenv, 3 - nodejs, 4 - buildNpmPackage, 5 lib, 6 fetchFromGitHub, 7 meson, ··· 62 hash = "sha256-2k+S+OXfdskJPtDUFSxb/+2UZcUiOZzRSSGgsEJWolc="; 63 }; 64 65 - webui = buildNpmPackage { 66 - pname = finalAttrs.pname + "-webui"; 67 - inherit (finalAttrs) src version meta; 68 - 69 - sourceRoot = "${finalAttrs.src.name}/webui"; 70 - 71 - npmDepsHash = "sha256-IpqineYa15GBqoPDJ7RpaDsq+MQIIDcdq7yhwmH4Lzo="; 72 - 73 - installPhase = '' 74 - rm -rf node_modules 75 - mkdir $out 76 - cp -r * $out 77 - ''; 78 - }; 79 - 80 nativeBuildInputs = [ 81 meson 82 ninja ··· 113 cp -R --no-preserve=mode,ownership ${finalAttrs.diameter} subprojects/freeDiameter 114 cp -R --no-preserve=mode,ownership ${finalAttrs.libtins} subprojects/libtins 115 cp -R --no-preserve=mode,ownership ${finalAttrs.promc} subprojects/prometheus-client-c 116 - 117 - rm -rf webui/* 118 - cp -r ${finalAttrs.webui}/* webui/ 119 ''; 120 121 postInstall = ''
··· 1 { 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 meson, ··· 60 hash = "sha256-2k+S+OXfdskJPtDUFSxb/+2UZcUiOZzRSSGgsEJWolc="; 61 }; 62 63 nativeBuildInputs = [ 64 meson 65 ninja ··· 96 cp -R --no-preserve=mode,ownership ${finalAttrs.diameter} subprojects/freeDiameter 97 cp -R --no-preserve=mode,ownership ${finalAttrs.libtins} subprojects/libtins 98 cp -R --no-preserve=mode,ownership ${finalAttrs.promc} subprojects/prometheus-client-c 99 ''; 100 101 postInstall = ''