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 shell.nix file for Nix users #105

Merged
merged 1 commit into from
Jan 31, 2017
Merged

Conversation

dermetfan
Copy link
Contributor

NixOS users may need this file to build Cursive if they don't want to install ncurses in their user profile.

@gyscos
Copy link
Owner

gyscos commented Jan 31, 2017

Thank you for your contribution!

I don't know much about NixOS; when would this file be required?
Would this help if a NixOS user tries to compile a rust application that depends on cursive?

@dermetfan
Copy link
Contributor Author

when would this file be required?

Every time they try to build Cursive. NixOS users enter a shell environment with the dependencies declared in shell.nix present so they get reproducible builds.

In theory those dependencies could also be installed system-wide, but I just tried that and it fails for some reason. I guess nix-shell environments keep references to build dependencies that are removed when the dependencies are installed as applications for the user.

Would this help if a NixOS user tries to compile a rust application that depends on cursive?

In this case Cursive is fetched as a compiled library so shell.nix is not included. They would need to write their own shell.nix for that project. However, if we have a shell.nix here they can just copy our dependencies into theirs.

@gyscos
Copy link
Owner

gyscos commented Jan 31, 2017

If nix users use cargo, I think it downloads dependencies and compiles them locally?

Anyway, I can merge that if there's cases where it helps.

@gyscos gyscos merged commit e0e96ab into gyscos:master Jan 31, 2017
@dermetfan
Copy link
Contributor Author

Even then, Cursive's shell.nix would not be downloaded into their project's root dir, so they'd need to type its full path somewhere in target/build/cursive-* every time. And if they need additional dependencies they still have to create their own file.

Cool, thanks!

@dermetfan dermetfan deleted the nix-shell branch January 31, 2017 19:18
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