How to compile Keycloak locally?

I am trying to compile the Keycloak main branch via mvn compile locally.

I am stuck there on building the Keycloak JavaScript Adapter:

[INFO] --- compiler:3.8.1:compile (default-compile) @ keycloak-crypto-elytron ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to [...]/keycloak/crypto/elytron/target/classes
[INFO] ----------------< org.keycloak:keycloak-js-adapter-jar >----------------
[INFO] Building Keycloak JavaScript Adapter (JAR) 999.0.0-SNAPSHOT     [20/183]
[INFO]   from adapters/oidc/js/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- enforcer:3.0.0-M3:enforce (enforce-java-version) @ keycloak-js-adapter-jar ---
[INFO] --- enforcer:3.0.0-M3:enforce (enforce-maven-version) @ keycloak-js-adapter-jar ---
[INFO] --- buildnumber:1.4:create (get-scm-revision) @ keycloak-js-adapter-jar ---
[INFO] --- frontend:1.14.2:install-node-and-pnpm (default) @ keycloak-js-adapter-jar ---
[INFO] Installing node version v18.18.2
[INFO] Unpacking [...]/.m2/repository/com/github/eirslett/node/18.18.2/node-18.18.2-linux-x64.tar.gz into [...]/keycloak/node/tmp
[INFO] Copying node binary from [...]/keycloak/node/tmp/node-v18.18.2-linux-x64/bin/node to [...]/keycloak/node/node
[INFO] Installed node locally.
[INFO] Installing pnpm version 8.10.0
[INFO] Unpacking [...]/.m2/repository/com/github/eirslett/pnpm/8.10.0/pnpm-8.10.0.tar.gz into [...]/keycloak/node/node_modules
[INFO] Installed pnpm locally.
[INFO] No pnpm executable found, creating symbolic link to [...]/src/iam/keycloak/node/node_modules/pnpm/bin/pnpm.cjs.
[INFO] --- frontend:1.14.2:pnpm (pnpm-install) @ keycloak-js-adapter-jar ---
[INFO] Running 'pnpm install --prefer-offline --frozen-lockfile --ignore-scripts' in [...]/keycloak/js/libs/keycloak-js
[INFO] Could not start dynamically linked executable: [...]/keycloak/node/node
[INFO] NixOS cannot run dynamically linked executables intended for generic
[INFO] linux environments out of the box. For more information, see:

It seems like Keycloak is using some frontend-maven-plugin, which downloads and installs node locally and nixos does not like this. Is there any way to fix this for me on my system without changing the repository code?