Skip to content
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

Add a nix shell #119

Closed
wants to merge 1 commit into from
Closed

Add a nix shell #119

wants to merge 1 commit into from

Conversation

rossabaker
Copy link
Member

Like http4s/http4s#3005, but particularly useful here, where a newer JDK is required.

@ChristopherDavenport
Copy link
Member

What does this do for us nix novices?

@rossabaker
Copy link
Member Author

rossabaker commented Dec 20, 2019

If I run nix-shell from this directory, I am dropped into a bash session that has an SBT that runs on JDK11, regardless of what sbt or java (if any) is globally installed on the system. All dependencies required to build the project, including the documentation, are available within this shell, at a consistent revision as pinned by nixpkgs-version.json.

The .envrc file is a direnv integration that makes this happen without an explicit call into nix-shell. If I cd into this directory, or open any of its files in my editor, I have a fully configured development environment for this project. If I cd into the core repo after http4s/http4s#3005, I get JDK8 and the hugo we need to build the site.

@rossabaker rossabaker closed this Dec 20, 2019
@rossabaker rossabaker reopened this Dec 20, 2019
Base automatically changed from master to main January 20, 2021 19:50
@amesgen
Copy link
Member

amesgen commented Mar 18, 2021

I don't use nix (apart from GHCJS experiments), do you still want to get this merged? @rossabaker

@rossabaker
Copy link
Member Author

I have a gitignored version. I find it particularly useful on this project, because it's the only one I use on Java 11. I'll refresh it with an updated version, but if it doesn't bother you, I'd appreciate having it around.

@amesgen
Copy link
Member

amesgen commented Jan 16, 2022

Actually, I have been converted to NixOS recently, and I would love to nixify this repo! Do you think the setup in typelevel/case-insensitive#210 is still a playground, or can we adopt it also here (I can prepare a PR)?

@rossabaker
Copy link
Member Author

I think it would be great to add it. It's particularly useful on this repo, which requires JDK 11, which is awkwardly between the 8 of Scala or the 17 that's current.

I'm experimenting on my personal config with workflows to automate flake updates, but as a baseline, what's merged on case-insensitive is good. Note that I'm assuming flakes.

@amesgen
Copy link
Member

amesgen commented Feb 2, 2022

Superseded by #556

@amesgen amesgen closed this Feb 2, 2022
@amesgen amesgen deleted the dev/nix branch February 2, 2022 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants