martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
8.39k stars 288 forks source link

Provide Nix packages #61

Closed martinvonz closed 2 years ago

martinvonz commented 2 years ago

I have no experience with Nix yet, so I'd appreciate help with this.

colemickens commented 2 years ago

I've been running this for quite some time. I have automation that updates it, but it's tied to my personal config. I plan to break this out into its own overlay tomorrow, making it easy for Nix users to acquire and auto-updated, similar to nixpkgs-wayland.

Until then... https://github.com/cole-mickens/nixcfg/blob/ce08089dad88e207e87bec67f9995c70491555db/pkgs/jj/default.nix

nix run github:colemickens/nixcfg#jj etc...

colemickens commented 2 years ago

Alternatively, if jj wanted to, it could adopt a flake.nix itself that utilizes something like nix-cargo-integration which lives with and builds jj, thereby always being up-to-date, and could be leveraged or at least added to CI, etc. This is what helix does: https://github.com/helix-editor/helix/blob/master/flake.nix

martinvonz commented 2 years ago

Wow, thank you! I don't even know what a "flake" is yet, so I can't say which I would prefer. I'll let you and other Nix users decide, but feel free to send me a PR for the flake if that's what you decide.

I'll be away for a week from tomorrow and will only have occasional internet access, and only via mobile.

arxanas commented 2 years ago

Various folks have provided Nix support for git-branchless, which should be pretty similar: https://github.com/arxanas/git-branchless/blob/master/flake.nix

You might be able to copy a majority of that. (I also don't know how Nix works.)

uhthomas commented 2 years ago

FWIW jj is on the Arch User Repository. Might be helpful?

jujutsu (source) jujutsu-git (source)

colemickens commented 2 years ago

Well I was typing a whole thing out presenting options but it looks like @pingiun beat me to it with an ideal option. 🎊 !

colemickens commented 2 years ago

Looks like this will be closed soon! It's a bit random, but if anyone is curious about Nix and wants some help/thoughts along the way, I love getting new people hooked on Nix and I hang out in all of the Nix/NixOS matrix rooms; feel free to ping me if you want!