I’m trying to run jhipster-lite, however it has a maven task (see below), that downloads a copy of nodejs to run within the project folder
The version of nodejs downloaded is not patched for Nix and so it fails to run as it cannot resolve
libstdc++.so.6, if I try to prefix it sadly still doesn’t run (even though
ldd says all libs resolve):
bash: ./node: No such file or directory
I’m wondering how folks generally deal with this, do they hack up the pom.xml or is there some magic that can be done to help this out?
Any help is appreciated
EDIT: Steps to reproduce:
# Enable java for the system and nixos-rebuild switch:
# programs.java.enable = true;
git clone https://github.com/jhipster/jhipster-lite
./mvnw spring-boot:build-image -Pnative
If you just want to build ‘interactively’, using buildFHSUserEnv in your shell.nix might be a good workaround.
There is some precedent for proposing upstream to explicitly use the nix linker to start commands inside the build (protoc-bridge/ProtocRunner.scala at f0610b4ebd702afd81c901264bd846f32e7f9f06 · scalapb/protoc-bridge · GitHub) so
buildFHSUserEnv is not needed, but perhaps there is a more elegant way?
Thanks for the reply …
At least to start, I think I’m going to try to run it containerized:
docker run --rm --pull=always -p 7471:7471 -v $(pwd):/tmp/jhlite:Z -it jhipster/jhipster-lite:latest
I expect the projects it generates will require that buildFHSUserEnv approach though as I don’t imagine a pure java project will want to accept nixos-specific customisations.
The general pattern for this type of thing is using any
--offline flags and pre-populating the cache to avoid java or whatever going out to the internet for something.
Unfortunately it doesn’t fit the
--offline model for producing jar/war/etc because it’s a hybrid application. I tried passing in
--offline to maven and it still tried to start
Well, I imagine a lenient definition of
offline might include calling external processes without invoking that processes likely non-existent
My next step would be to answer:
“What maven configuration is causing ./node/node to be called?”