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
ruby: add ruby.withPackages #61114
ruby: add ruby.withPackages #61114
Conversation
It's a good idea. We should have all the gems that are referenced in the |
19b82d6
to
7e5cff5
Compare
1ecb2b6
to
688fb8c
Compare
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/what-are-your-goals-for-19-09/2875/5 |
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/ruby-gem-typhoeus-could-not-open-library-libcurl/2677/11 |
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.
looking good!
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.
This is awesome. Thanks for the work.
-
I think
ruby-packages.nix
would make more sense aspkgs/development/ruby-modules/with-packages/gemset.nix
. -
Do we really have to expose a top-level attribute to get hydra to build the gems? That’s annoying…
I mirrored the structure of Haskell/Idris/Lua/Python for the with-packages naming, so I think that's the right location. And yes, Hydra will not look into |
attrs = functions.applyGemConfigs ({ inherit ruby; gemName = name; } // initialAttrs); | ||
in | ||
buildRubyGem (functions.composeGemAttrs ruby gems name attrs) | ||
) (import ../../../top-level/ruby-packages.nix); |
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.
What is the advantage of creating so much distance between the producer and the consumer of the gems.nix file?
Even the updater script could be moved into this folder so everything is co-located.
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.
For the ruby-packages.nix
I follow the pattern of all the other languages that put them in top-level
. I agree that it's a bit awkward to have them so separated, but I didn't really want to clutter the top-level
directory with too much ruby specific stuff.
I can maybe invoke update-ruby-packages
from the /maintainers/scripts
and put the actual code in the with-packages
directory. Again, I tried to be consistent with update-python-packages
update-luarocks-packages
.
This makes sense to me, although if we’re doing that we might want to mirror the |
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.
I’d like the defaultGemConfig
changes to be in their own commit.
''; | ||
}; | ||
fog-dnsimple = attrs: | ||
if lib.versionOlder attrs.version "1.0.1" then { |
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.
Suggestion: lib.optionalAttrs
FileUtils.mkdir_p(tmpdir) | ||
|
||
failing = test_cases.reject do |name, test_case| | ||
test_case = <<-SHELL |
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.
test_case = <<-SHELL | |
test_case = <<~SHELL |
Will let you indent the below nicely.
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, my rubocop somehow is stuck at 2.2 or 2.3 and doesn't accept the syntax. I think we can remove this file anyway since we have the test.nix
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/ruby-exposing-new-gems-to-a-bundlerapp-installed-tool/2989/3 |
What's the status of this PR? |
99a79d4
to
80ef88e
Compare
Alright. The docs look really good! |
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.
These docs are amazing. Some of the best I’ve seen for nixpkgs.
In addition to these comments, it looks like a couple of mine from previous reviews are still outstanding.
750a569
to
61cc0b5
Compare
I'm pumped to see this land! |
61cc0b5
to
2b9a394
Compare
What is the status? I think it would be good if this could go in before branch-off Saturday the 7th. Note that due to the rebuilds it also needs to go via staging which takes extra time. |
I’m going to make some small doc tweaks and then merge, probably today. |
Actually, it will be tight to get it into staging, so just send it to master. It's less than 2500 rebuilds so it's not that bad. |
9c6b446
to
6106a62
Compare
Co-authored-by: Alyssa Ross <hi@alyssa.is>
6106a62
to
28d7e50
Compare
Motivation for this change
This is mostly open for discussion, it allows usage of
ruby.withPackages
similar to the way python and haskell work.It also includes
ruby.gems
, with correspondingruby_2_3-gems
ruby_2_4-gems
ruby_2_5-gems
ruby_2_6-gems
attributes in top-level to allow hydra to compile them.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)