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

Nix flake #2732

Merged
merged 7 commits into from
Mar 29, 2022
Merged

Nix flake #2732

merged 7 commits into from
Mar 29, 2022

Conversation

Anton-4
Copy link
Contributor

@Anton-4 Anton-4 commented Mar 16, 2022

Added nix flake as a workaround for #1846.
The flake currently only works on linux x86_64, I'll make an issue to add support for other configurations.
Building(cargo build) will regularly print an error message concerning version issues with ncurses (see #2735 ), but everything works.

@Anton-4 Anton-4 added the nix label Mar 16, 2022
@Anton-4 Anton-4 changed the title WIP Nix flake Nix flake Mar 16, 2022
Copy link
Contributor

@bhansconnect bhansconnect left a comment

Choose a reason for hiding this comment

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

Hmm. These changes seem pretty simple. I was some reason expecting this to have more of an effect.

### Install
### On NixOS

[For NixOS only Linux x86_64 is supported for now](https://github.com/rtfeldman/roc/issues/2734).
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer this not to get merged until it supports other platforms. I depend on nix on other platforms to compiler roc. I assume that is the case for some other people as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I probably can try to look into this on my m1 mac

Copy link
Contributor Author

@Anton-4 Anton-4 Mar 18, 2022

Choose a reason for hiding this comment

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

👍 no problem, I wanted to merge it because nix-shell does not work (#1846) on NixOS but I mentioned the branch on zulip so that should do for now.


[For NixOS only Linux x86_64 is supported for now](https://github.com/rtfeldman/roc/issues/2734).

NixOS users should make use of the nix flake by [enabling nix flakes](https://nixos.wiki/wiki/Flakes). Shell creation can be done by executing `nix develop` from the root of the repo. NixOS users that do not make use of this flake will get stuck on issue #1846.
Copy link
Contributor

Choose a reason for hiding this comment

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

does nix develop still work with lorri / direnv?

Copy link
Contributor Author

@Anton-4 Anton-4 Mar 18, 2022

Choose a reason for hiding this comment

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

Making direnv work with flakes requires some minor config changes, see here.
For lorri there is this workaround which does require a different shell.nix . I do suppose that once we support the same platforms with flakes we can swap our current shell.nix out with the workaround version.

@Anton-4
Copy link
Contributor Author

Anton-4 commented Mar 18, 2022

Uhu, It does fix #1846, which is all the effect I needed :p

@rtfeldman
Copy link
Sponsor Contributor

@bhansconnect Does this look mergeable to you?

Copy link
Contributor

@bhansconnect bhansconnect left a comment

Choose a reason for hiding this comment

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

This doesn't change anything about current nix, so it is fine to merge. Eventually we should figure out updating current nix to flakes.

@bhansconnect bhansconnect merged commit c457fef into trunk Mar 29, 2022
@bhansconnect bhansconnect deleted the nix-flake branch March 29, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants