-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build support for Nix and Guix #22
Comments
Thanks for preemptively opening this. The main issue is that Nix and Guix builds are supposed to be 100% reproducible, meaning that the package spec will output the exact same binaries no matter when or where you build it. In particular, dependencies are pinned, so auto-downloading is a no-go. At the very least, we probably want a switch that tells the build system to not download anything and rely on the build host to supply dependencies. I'll poke at this more later. |
Currently just sanity checking the build process. Stopped for now after hitting the below error, probably because graalvm stuff isn't on the classpath:
|
I pushed a
I see the same thing running inside
I dug around for a while but was unable to get further.
The contents of the graalvm dir are not nearly the same:
Hopefully that gives you some ideas for where to dig next. I'd prefer that you do further testing using |
@ingydotnet Thanks for poking around. I think we just need to tell lein about graalvm. I believe Nix defines some classpath munging stuff for just this kind of thing. Will take a look. BTW, trying to ad hoc detect Nix like in the Cheers! |
@xelxebar sounds good! |
Started a PR: #29. Moving discussion there. |
Closing this issue. Moved to #29 |
The build system for YS is made to work with minimal dependencies: bash, make and curl is about all you need.
The
make build
command just works, because it uses curl to download, cache and configure: java, javac, jdk, native-image, lein, etc.If any of these are already installed on the system, those items are ignored.
Only the downloaded versions are used.
This makes for an extremely simple and reliable build system.
However, I'm told this won't work for Nix and Guix. Maybe others?
The YS Makefile system is somewhat complex but also well structured. Every subdir has a Makefile, and all the common parts are included from
common/*.mk
files.The important files to adjust here are
common/vars.mk
andcommon/clojure.mk
.We need to detect when we are building on Nix/Guix then use the system deps.
I imagine this comes down to not setting
JAVA_HOME
andPATH
to the usual downloaded/cached/tmp/...
values.This is the limit of my understanding.
Creating this issue for others to weigh in on.
The text was updated successfully, but these errors were encountered: