frontend: switch to patched web/package-lock.json version 3

This commit is contained in:
WilliButz 2023-07-13 11:57:15 +02:00
parent 3b9fff6c23
commit 6207ab1e66
No known key found for this signature in database
GPG key ID: FB0513677AB15BEA
3 changed files with 6763 additions and 18599 deletions

View file

@ -61,7 +61,7 @@
in {
packages = rec {
docs = napalm.legacyPackages.${system}.buildPackage "${authentik-src}/website" {
version = authentik-version; # 0.0.0 specified upstream
version = authentik-version; # 0.0.0 specified upstream in package.json
NODE_ENV = "production";
nodejs = pkgs.nodejs_20;
npmCommands = [
@ -75,17 +75,24 @@
'';
};
frontend = napalm.legacyPackages.${system}.buildPackage "${authentik-src}/web" {
version = authentik-version; # 0.0.0 specified upstream
packageLock = ./web-package-lock.json; # needs to be lock file version 2 for napalm, upstream uses v3
version = authentik-version; # 0.0.0 specified upstream in package.json
packageLock = let
# https://github.com/goauthentik/authentik/issues/6180
srcWithFullyResolvedLockfile = pkgs.applyPatches {
name = "authentik-src-with-patched-package-lock";
src = authentik-src;
patches = [
./web-package-lock.json.patch
];
};
in "${srcWithFullyResolvedLockfile}/web/package-lock.json";
NODE_ENV = "production";
nodejs = pkgs.nodejs_20;
preBuild = ''
ln -sv ${docs} ../website
'';
npmCommands = [
"npm install --include=dev"
"sed -i'' -e 's,/usr/bin/env node,/bin/node,' node_modules/@lingui/cli/dist/lingui.js"
"patchShebangs node_modules/@lingui/cli/dist/lingui.js"
"npm install --include=dev --nodedir=${pkgs.nodejs_20}/include/node --loglevel verbose --ignore-scripts"
"npm run build"
];
installPhase = ''

18593
web-package-lock.json generated

File diff suppressed because it is too large Load diff

6750
web-package-lock.json.patch Normal file

File diff suppressed because it is too large Load diff