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
refactor: refactor jruby to allow multiple versions #94876
base: master
Are you sure you want to change the base?
Conversation
v9_2_12_0 = generic_jruby { | ||
version = "9.2.12.0"; | ||
sha256 = "013c1q1n525y9ghp369z1jayivm9bw8c1x0g5lz7479hqhj62zrh"; | ||
rubyVersion = rubyVersion "2" "5" "7" ""; |
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.
> nix run -f $(pwd) jruby-group.v9_2_13_0 --command ruby -e 'puts RUBY_VERSION'
2.5.7
v9_2_13_0 = generic_jruby { | ||
version = "9.2.13.0"; | ||
sha256 = "0n5glz6xm3skrfihzn3g5awdxpjsqn2k8k46gv449rk2l50w5a3k"; | ||
rubyVersion = rubyVersion "2" "5" "7" ""; |
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.
❯ nix run -f $(pwd) jruby-group.v9_2_12_0 --command ruby -e 'puts RUBY_VERSION'
[1 built, 25 copied (211.7 MiB), 67.4 MiB DL]
2.5.7
@@ -10084,7 +10084,8 @@ in | |||
|
|||
sourceFromHead = callPackage ../build-support/source-from-head-fun.nix {}; | |||
|
|||
jruby = callPackage ../development/interpreters/jruby { }; | |||
jruby-group = callPackage ../development/interpreters/jruby {}; | |||
jruby = jruby-group.latest; |
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 keeps all packages that rely on JRuby still working and backwards compatible
Many packages within Nix support multiple packages & a versionless attribute that tracks "latest"; This refactors the JRuby derivation to be similar to that of Ruby itself.
dc9d5f7
to
1846317
Compare
passthru = oldAttrs.passthru // { | ||
devEnv = callPackage ../ruby/dev.nix { | ||
ruby = jruby; | ||
}; |
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 unnecessary and inlined within the generic builder.
It relies on "self" to be self-referential to the ruby it's building.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I marked this as stale due to inactivity. → More info |
Motivation for this change
Many packages within Nix support multiple packages & a versionless
attribute that tracks "latest";
This refactors the JRuby derivation to be similar to that of Ruby
itself.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)