Skip to content

add a nix flake to build just#2972

Open
neunenak wants to merge 1 commit intocasey:masterfrom
neunenak:flake-nix
Open

add a nix flake to build just#2972
neunenak wants to merge 1 commit intocasey:masterfrom
neunenak:flake-nix

Conversation

@neunenak
Copy link
Contributor

work in progress, I think it might be good to have a nix flake that builds the project for better integration into the nix ecosystem.

@casey
Copy link
Owner

casey commented Mar 8, 2026

Is this still something you're working on? I'm not sure I understand what a flake is for in this case, since Just is packaged in nixpkgs. And I thought a shell.nix, or something, was what you used for development. This is probably just ignorance on my part, since I am still confused by what a flake is 😅

@neunenak
Copy link
Contributor Author

neunenak commented Mar 9, 2026

Is this still something you're working on? I'm not sure I understand what a flake is for in this case, since Just is packaged in nixpkgs. And I thought a shell.nix, or something, was what you used for development. This is probably just ignorance on my part, since I am still confused by what a flake is 😅

There are some benefits for people developing the project itself. Nix flakes are basically the modern, more-or-less-standard way to describe how to build and otherwise work with a software project in the nix ecosystem. In a flake.nix file you can define a devshell in the same way that shell.nix works, but also be more principled about pinning build inputs and do a few other things.

I think what I wanted this for was so that I could then define inputs in my own flake that look like `just.url = "github:casey/just", which would pin whatever git revision I wanted in a local lockfile and build exactly that version of just. Which lets someone using e.g. nix home-manager with flakes easily install the latest version without having to wait for a release or for the nixpkgs maintainers to update the official version. I got njbrake/agent-of-empires#309 merged into that project for basically the same reason.

Anyway I honestly forgot I had this draft PR open and now that I know claude can throw a basic build-rust flake.nix together pretty easily I'll probably ask it to fix whatever's broken about this PR and remove the draft.

@casey
Copy link
Owner

casey commented Mar 9, 2026

Sounds good, it seems useful.

@neunenak neunenak force-pushed the flake-nix branch 2 times, most recently from f9ec9d8 to 3883a99 Compare March 9, 2026 22:47
This commit adds a Nix flake to just, to make it possible to build just
locally using the Nix flake infrastructure and distribute just as a
flake input.
@neunenak neunenak changed the title WIP add a nix flake to build just add a nix flake to build just Mar 9, 2026
@neunenak neunenak marked this pull request as ready for review March 9, 2026 23:01
@neunenak
Copy link
Contributor Author

@casey this is ready for review now

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.

2 participants