-
Notifications
You must be signed in to change notification settings - Fork 155
Use nix to manage development environment #2496
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
Conversation
This will allow us to have the same environment as the rest of the company.
| - libyaml | ||
| - zlib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these needed because ruby depends on them? If so, isn't that something that should be baked into the requirements of the ruby derivation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libyaml because of psych and zlib because of faraday-gzip that depends on the zlib gem. If those gems weren't being required in the Gemfile.lock those packages would not be needed, so no, I don't think it should be in the ruby derivation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But psych and zlib are both default gems, so they should be coming with a Ruby installation, and their dependencies should also be pulled in by default, no? (I am not sure if the zlib gem has a dependency on the zlib package, but psych should definitely be pulling libyaml in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libyaml and zlib as just needed to build Ruby. After it is built you don't need it anymore. You only need again if you aren't using the Ruby default gems and is building it from source again, which is the case here, no? Now, why rubygems is building from source and not using the default gem I don't know. Maybe different versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't mean to hold up this PR for this, we can discuss async as well, but my understanding of the Nix store was that dependencies of things that you installed persisted in the store, so I was expecting at least libyaml to be present after installing ruby. But, maybe my assumptions are wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is what I thought. The derivation has it as build packages. After it is built it is gone https://github.com/bobvanderlinden/nixpkgs-ruby/blob/master/ruby/package-fn.nix#L76-L79.
Maybe we should add to our own ruby flake, but we don't have one right now, AFAIK
This will allow us to have the same environment as the rest of the company.