-
Notifications
You must be signed in to change notification settings - Fork 1
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
Reproducible development environment with Nix #56
Conversation
build.sbt
Outdated
// Tell sbt to look at $CLASSPATH for unmanaged jars. This is | ||
// where system-installed jars (such as jars that depend on native | ||
// libraries) are usually found. | ||
unmanagedClasspath in Compile ++= systemClasspath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to use something like cuantoClasspath
or nixClasspath
.
78b2ad3
to
9cd1865
Compare
I have changed the SBT configuration to search in I've tested this change for |
459ca71
to
d48fcba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works on my (abnormal) system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that japron-test
passed sbt test
on Mac
As discussed, the Windows troubleshooting documentation will be its own PR, addressing Issue #57. |
This adds a
cuanto
Nix derivation which specifiescuanto
's external system-installed dependencies and allows quick entry into a complete development environment (as explained in CONTRIBUTING.md):The
CONTRIBUTING.md
doc also instructs you to addcuplv-nixpkgs
to your Nix overlays. This is not necessary for any ofcuanto
's current dependencies, but is used by theapron
branch currently under PR (for thejapron
package). This overlay would be a convenient way for CUPLV researchers to quickly make their own projects available for integration intocuanto
in the future.Usage: Adding new dependencies
To add a new dependency (with a package existing in either the main
nixpkgs
orcuplv-nixpkgs
, editdefault.nix
. Add the package's name to the derivation inputs (the comma-separated list in curly braces at the top of the file) and to the build inputs (the space-separated list in square brackets assigned tobuildInputs
).For an example of adding a dependency, see this commit for setting up
japron
.Travis builds
Additionally, this PR modifies the Travis configuration so that our CI builds use the same environment. This way, adding new dependencies to your development environment by editing
default.nix
adds them to the Travis build environment as well.System class-path for SBT
Finally, this PR configures SBT to search for unmanaged jars in
$CLASSPATH
, the standard environment variable which points to all system-installed java libraries (in particular this variable is set bynix-shell
to point to all jars from the specified dependencies). It is necessary to use system-installed jars when they depend on native libraries, as is the case forjapron
.