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

Added Nix build and dev-shell support via Nix flakes #1199

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

Philipp-M
Copy link
Contributor

This PR adds support for Nix flakes (and the legacy nix build system via flake-compat).

Tested on NixOS, it may or not may run on other (linux/osx?) distributions.

I hacked this together to run and (likely) package Fornjot on NixOS, FWIW it may be helpful for other Nix users as well.

I can extend the README as well if it's helpful (Where would it fit best, in case?)

This can be run with (nix flakes enabled):

nix run github:Philipp-M/Fornjot/nix-flakes

or (without nix flakes enabled, in repo):

nix-build .
./result/bin/fj-app

Also supports a devshell environment, via nix shell

@Philipp-M Philipp-M requested a review from hannobraun as a code owner October 10, 2022 23:19
Copy link
Owner

@hannobraun hannobraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this pull request, @Philipp-M!

I don't know enough about Nix or NixOS to review this properly, but I'm happy to trust your word on that it works and that it may be helpful to other Nix users. Happy to merge, but I'd like to make a few things clear:

  • I don't use Nix or NixOS, so I won't notice if this breaks. People will have to open issues, if that happens.
  • I don't have the skills to maintain this, nor the bandwidth and will to learn. If this is going to need updates going forward, those will have to be made by contributors.
  • If this ends up broken, and no one steps up to fix it for a while, I might decide to remove it.

Does that sound reasonable?

I can extend the README as well if it's helpful (Where would it fit best, in case?)

There's a section on installation: https://github.com/hannobraun/Fornjot#installation

I think it would be appropriate to add a note there.


I'm merging this now, as I'm happy with it as-is. Any further improvements (like an addition to the README) would be very welcome in a follow-up PR.

@hannobraun
Copy link
Owner

Question: Would it be practical to move all those files into a subdirectory? Maybe nix/ or packages/nix/?

If so, this would be another welcome addition that I'd be happy to merge.

@hannobraun hannobraun merged commit e02c595 into hannobraun:main Oct 11, 2022
@Philipp-M
Copy link
Contributor Author

  • I don't use Nix or NixOS, so I won't notice if this breaks. People will have to open issues, if that happens.
  • I don't have the skills to maintain this, nor the bandwidth and will to learn. If this is going to need updates going forward, those will have to be made by contributors.
  • If this ends up broken, and no one steps up to fix it for a while, I might decide to remove it.

Sure feel free to ping me as soon as there's a nix related issue, I can maintain that part.

Would it be practical to move all those files into a subdirectory? Maybe nix/

Yes I can do that.

@hannobraun
Copy link
Owner

Thank you, @Philipp-M, that's great!

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