From 02ad3159b00875b702a92b64c7f231d184f68c84 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 26 Nov 2023 23:34:32 +0100 Subject: [PATCH] ruby_2_7: remove --- doc/languages-frameworks/ruby.section.md | 4 ++-- nixos/modules/services/misc/redmine.nix | 2 +- pkgs/development/interpreters/ruby/default.nix | 5 ----- pkgs/development/ruby-modules/with-packages/test.nix | 2 +- pkgs/top-level/all-packages.nix | 2 -- pkgs/top-level/pkg-config/pkg-config-data.json | 5 ----- 6 files changed, 4 insertions(+), 16 deletions(-) diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index 920c84eee689..749a78e95e8e 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -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. diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index b517170cda21..c1209e34a92b 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -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 { diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index e358ea31e0fc..8eb19835828b 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -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="; diff --git a/pkgs/development/ruby-modules/with-packages/test.nix b/pkgs/development/ruby-modules/with-packages/test.nix index be652747c469..50947a44a243 100644 --- a/pkgs/development/ruby-modules/with-packages/test.nix +++ b/pkgs/development/ruby-modules/with-packages/test.nix @@ -6,7 +6,7 @@ let stdenv = pkgs.stdenv; rubyVersions = with pkgs; [ - ruby_2_7 + ruby_3_2 ]; gemTests = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9185d41d359c..c99ed6294e68 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; diff --git a/pkgs/top-level/pkg-config/pkg-config-data.json b/pkgs/top-level/pkg-config/pkg-config-data.json index 50eae9ac572d..94808884918f 100644 --- a/pkgs/top-level/pkg-config/pkg-config-data.json +++ b/pkgs/top-level/pkg-config/pkg-config-data.json @@ -768,11 +768,6 @@ "python3" ] }, - "ruby-2.7": { - "attrPath": [ - "ruby_2_7" - ] - }, "ruby-3.1": { "attrPath": [ "ruby_3_1"