ruby_2_7: remove

This commit is contained in:
ajs124 2023-11-26 23:34:32 +01:00
parent 2c5a053a9b
commit 02ad3159b0
6 changed files with 4 additions and 16 deletions

View file

@ -2,13 +2,13 @@
## Using Ruby {#using-ruby}
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_3_y`, `jruby`, or `mruby`.
In the Nixpkgs tree, Ruby packages can be found throughout, depending on what they do, and are called from the main package set. Ruby gems, however are separate sets, and there's one default set for each interpreter (currently MRI only).
There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_7.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_3_2.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.

View file

@ -53,7 +53,7 @@ in
enable = mkEnableOption (lib.mdDoc "Redmine");
package = mkPackageOption pkgs "redmine" {
example = "redmine.override { ruby = pkgs.ruby_2_7; }";
example = "redmine.override { ruby = pkgs.ruby_3_2; }";
};
user = mkOption {

View file

@ -316,11 +316,6 @@ in {
mkRubyVersion = rubyVersion;
mkRuby = generic;
ruby_2_7 = generic {
version = rubyVersion "2" "7" "8" "";
hash = "sha256-wtq2PLyPKgVSYQitQZ76Y6Z+1AdNu8+fwrHKZky0W6A=";
};
ruby_3_1 = generic {
version = rubyVersion "3" "1" "4" "";
hash = "sha256-o9VYeaDfqx1xQf3xDSKgfb+OXNxEFdob3gYSfVzDx7Y=";

View file

@ -6,7 +6,7 @@ let
stdenv = pkgs.stdenv;
rubyVersions = with pkgs; [
ruby_2_7
ruby_3_2
];
gemTests =

View file

@ -18026,7 +18026,6 @@ with pkgs;
})
mkRubyVersion
mkRuby
ruby_2_7
ruby_3_1
ruby_3_2
ruby_3_3;
@ -18034,7 +18033,6 @@ with pkgs;
ruby = ruby_3_1;
rubyPackages = rubyPackages_3_1;
rubyPackages_2_7 = recurseIntoAttrs ruby_2_7.gems;
rubyPackages_3_1 = recurseIntoAttrs ruby_3_1.gems;
rubyPackages_3_2 = recurseIntoAttrs ruby_3_2.gems;
rubyPackages_3_3 = recurseIntoAttrs ruby_3_3.gems;

View file

@ -768,11 +768,6 @@
"python3"
]
},
"ruby-2.7": {
"attrPath": [
"ruby_2_7"
]
},
"ruby-3.1": {
"attrPath": [
"ruby_3_1"