diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index 25c31de17e71e..62ab8b309635f 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -8,7 +8,7 @@ In the Nixpkgs tree, Ruby packages can be found throughout, depending on what th 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_3_2.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_4.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 1253bae48a6d3..983ba57e57d61 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -80,7 +80,7 @@ in enable = lib.mkEnableOption "Redmine, a project management web application"; package = lib.mkPackageOption pkgs "redmine" { - example = "redmine.override { ruby = pkgs.ruby_3_2; }"; + example = "redmine.override { ruby = pkgs.ruby_3_4; }"; }; user = lib.mkOption { diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index a92d97d57e3d3..fcb8a7de920eb 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -7,9 +7,9 @@ gettext, pkg-config, cscope, - ruby_3_2, + ruby, tcl, - perl540, + perl, luajit, darwin, libiconv, @@ -18,9 +18,9 @@ # Try to match MacVim's documented script interface compatibility let - perl = perl540; - # Ruby 3.2 - ruby = ruby_3_2; + #perl = perl540; + # Ruby 3.3 + #ruby = ruby_3_3; # Building requires a few system tools to be in PATH. # Some of these we could patch into the relevant source files (such as xcodebuild and @@ -215,5 +215,33 @@ stdenv.mkDerivation (finalAttrs: { maintainers = [ ]; platforms = platforms.darwin; hydraPlatforms = [ ]; # hydra can't build this as long as we rely on Xcode and sandboxProfile + # Needs updating to a newer MacVim for Python and Ruby version support + broken = true; + knownVulnerabilities = [ + "CVE-2023-46246" + "CVE-2023-48231" + "CVE-2023-48232" + "CVE-2023-48233" + "CVE-2023-48234" + "CVE-2023-48235" + "CVE-2023-48236" + "CVE-2023-48237" + "CVE-2023-48706" + "CVE-2023-5344" + "CVE-2023-5441" + "CVE-2023-5535" + "CVE-2024-22667" + "CVE-2024-41957" + "CVE-2024-41965" + "CVE-2024-43374" + "CVE-2024-47814" + "CVE-2025-1215" + "CVE-2025-22134" + "CVE-2025-24014" + "CVE-2025-26603" + "CVE-2025-29768" + "CVE-2025-53905" + "CVE-2025-53906" + ]; }; }) diff --git a/pkgs/by-name/so/sonic-pi/package.nix b/pkgs/by-name/so/sonic-pi/package.nix index ecaf08b0c11ea..caade728fd536 100644 --- a/pkgs/by-name/so/sonic-pi/package.nix +++ b/pkgs/by-name/so/sonic-pi/package.nix @@ -8,12 +8,13 @@ cmake, pkg-config, catch2_3, + ncurses, kdePackages, kissfftFloat, crossguid, reproc, platform-folders, - ruby_3_2, + ruby, beamPackages, alsa-lib, rtmidi, @@ -31,11 +32,15 @@ gl3w, SDL2, fmt, -}: +}@args: -# Sonic Pi fails to build with Ruby 3.3. let - ruby = ruby_3_2; + ruby = args.ruby.withPackages (ps: [ + ps.prime + ps.racc + ps.rake + ps.rexml + ]); in stdenv.mkDerivation (finalAttrs: { @@ -72,6 +77,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ + ncurses kdePackages.qtbase kdePackages.qtsvg kdePackages.qttools diff --git a/pkgs/by-name/tr/tree-from-tags/Gemfile.lock b/pkgs/by-name/tr/tree-from-tags/Gemfile.lock index 0ae90c1aebbea..e69de29bb2d1d 100644 --- a/pkgs/by-name/tr/tree-from-tags/Gemfile.lock +++ b/pkgs/by-name/tr/tree-from-tags/Gemfile.lock @@ -1,13 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - taglib-ruby (0.7.1) - -PLATFORMS - ruby - -DEPENDENCIES - taglib-ruby - -BUNDLED WITH - 2.1.4 diff --git a/pkgs/by-name/tr/tree-from-tags/gemset.nix b/pkgs/by-name/tr/tree-from-tags/gemset.nix index 67fd0af058236..092bcece7fbb2 100644 --- a/pkgs/by-name/tr/tree-from-tags/gemset.nix +++ b/pkgs/by-name/tr/tree-from-tags/gemset.nix @@ -1,10 +1,12 @@ { taglib-ruby = { + groups = [ "default" ]; + platforms = [ ]; source = { remotes = [ "https://rubygems.org" ]; - sha256 = "0r8g7zdncc6243d000jn0grc1n70rn9mx16vggy3q7c4wgsa37xi"; + sha256 = "1bmirkz9lfhbykj3x48z1gv0jl1bfz60yscpl0hmjxrdmcihzfai"; type = "gem"; }; - version = "0.7.1"; + version = "2.0.0"; }; } diff --git a/pkgs/by-name/un/unit/package.nix b/pkgs/by-name/un/unit/package.nix index 5ac7dbc9ab7e1..eb3841fbac713 100644 --- a/pkgs/by-name/un/unit/package.nix +++ b/pkgs/by-name/un/unit/package.nix @@ -12,10 +12,6 @@ php82, withPerl ? true, perl, - withRuby_3_1 ? true, - ruby_3_1, - withRuby_3_2 ? false, - ruby_3_2, withSSL ? true, openssl ? null, withIPv6 ? true, @@ -58,8 +54,6 @@ stdenv.mkDerivation rec { ] ++ optional withPHP82 php82-unit ++ optional withPerl perl - ++ optional withRuby_3_1 ruby_3_1 - ++ optional withRuby_3_2 ruby_3_2 ++ optional withSSL openssl; configureFlags = [ @@ -79,8 +73,6 @@ stdenv.mkDerivation rec { ${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"} ${optionalString withPHP82 "./configure php --module=php82 --config=${php82-unit.unwrapped.dev}/bin/php-config --lib-path=${php82-unit}/lib"} ${optionalString withPerl "./configure perl --module=perl --perl=${perl}/bin/perl"} - ${optionalString withRuby_3_1 "./configure ruby --module=ruby31 --ruby=${ruby_3_1}/bin/ruby"} - ${optionalString withRuby_3_2 "./configure ruby --module=ruby32 --ruby=${ruby_3_2}/bin/ruby"} ''; passthru.tests = { diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 7bb5ee799c5fc..d01980ee3a912 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -57,14 +57,9 @@ let }: let ver = version; - atLeast31 = lib.versionAtLeast ver.majMin "3.1"; - atLeast32 = lib.versionAtLeast ver.majMin "3.2"; # https://github.com/ruby/ruby/blob/v3_2_2/yjit.h#L21 yjitSupported = - atLeast32 - && ( - stdenv.hostPlatform.isx86_64 || (!stdenv.hostPlatform.isWindows && stdenv.hostPlatform.isAarch64) - ); + stdenv.hostPlatform.isx86_64 || (!stdenv.hostPlatform.isWindows && stdenv.hostPlatform.isAarch64); rubyDrv = lib.makeOverridable ( { stdenv, @@ -188,25 +183,13 @@ let # make: *** [uncommon.mk:373: do-install-all] Error 1 enableParallelInstalling = false; - patches = - op (lib.versionOlder ver.majMin "3.1") ./do-not-regenerate-revision.h.patch - ++ op useBaseRuby ( - if atLeast32 then ./do-not-update-gems-baseruby-3.2.patch else ./do-not-update-gems-baseruby.patch - ) - ++ ops (ver.majMin == "3.0") [ - # Ruby 3.0 adds `-fdeclspec` to $CC instead of $CFLAGS. Fixed in later versions. - (fetchpatch { - url = "https://github.com/ruby/ruby/commit/0acc05caf7518cd0d63ab02bfa036455add02346.patch"; - hash = "sha256-43hI9L6bXfeujgmgKFVmiWhg7OXvshPCCtQ4TxqK1zk="; - }) - ] - ++ ops atLeast31 [ - # When using a baseruby, ruby always sets "libdir" to the build - # directory, which nix rejects due to a reference in to /build/ in - # the final product. Removing this reference doesn't seem to break - # anything and fixes cross compilation. - ./dont-refer-to-build-dir.patch - ]; + patches = op useBaseRuby ./do-not-update-gems-baseruby-3.2.patch ++ [ + # When using a baseruby, ruby always sets "libdir" to the build + # directory, which nix rejects due to a reference in to /build/ in + # the final product. Removing this reference doesn't seem to break + # anything and fixes cross compilation. + ./dont-refer-to-build-dir.patch + ]; cargoRoot = opString yjitSupport "yjit"; @@ -410,17 +393,6 @@ in mkRubyVersion = rubyVersion; mkRuby = generic; - ruby_3_1 = generic { - version = rubyVersion "3" "1" "7" ""; - hash = "sha256-BVas1p8UHdrOA/pd2NdufqDY9SMu3wEkKVebzaqzDns="; - }; - - ruby_3_2 = generic { - version = rubyVersion "3" "2" "9" ""; - hash = "sha256-q7rZjbmusVJ3Ow01ho5QADuMRn89BhUld8Tf7Z2I7So="; - cargoHash = "sha256-CMVx5/+ugDNEuLAvyPN0nGHwQw6RXyfRsMO9I+kyZpk="; - }; - ruby_3_3 = generic { version = rubyVersion "3" "3" "9" ""; hash = "sha256-0ZkWkKThcjPsazx4RMHhJFwK3OPgDXE1UdBFhGe3J7E="; diff --git a/pkgs/development/interpreters/ruby/do-not-regenerate-revision.h.patch b/pkgs/development/interpreters/ruby/do-not-regenerate-revision.h.patch deleted file mode 100644 index ddeb368ee8aeb..0000000000000 --- a/pkgs/development/interpreters/ruby/do-not-regenerate-revision.h.patch +++ /dev/null @@ -1,23 +0,0 @@ -Do not regenerate revision.h - -Ruby's makefile compares the shipped version with the git revision to regenerate -revision.h [1], but since we don't include git in buildInputs, this comparison -fails and it can't find $(REVISION_H). - -[1] https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae - -diff -Naur ruby.old/defs/gmake.mk ruby.new/defs/gmake.mk ---- ruby.old/defs/gmake.mk -+++ ruby.new/defs/gmake.mk -@@ -325,11 +325,9 @@ - - REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h 2>/dev/null) - REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && git log -1 --format=%H 2>/dev/null) --ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST)) - # GNU make treat the target as unmodified when its dependents get - # updated but it is not updated, while others may not. - $(srcdir)/revision.h: $(REVISION_H) --endif - - # Query on the generated rdoc - # diff --git a/pkgs/development/interpreters/ruby/do-not-update-gems-baseruby.patch b/pkgs/development/interpreters/ruby/do-not-update-gems-baseruby.patch deleted file mode 100644 index 2de1977630cb8..0000000000000 --- a/pkgs/development/interpreters/ruby/do-not-update-gems-baseruby.patch +++ /dev/null @@ -1,14 +0,0 @@ -Do not update gems when building with base ruby - -diff -Naur ruby.old/defs/gmake.mk ruby.new/defs/gmake.mk ---- ruby.old/common.mk -+++ ruby.new/common.mk -@@ -1298,7 +1298,7 @@ update-config_files: PHONY - config.guess config.sub - - refresh-gems: update-bundled_gems prepare-gems --prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems) -+prepare-gems: - - update-gems$(gnumake:yes=-nongnumake): PHONY - $(ECHO) Downloading bundled gem files... diff --git a/pkgs/development/ruby-modules/with-packages/test.nix b/pkgs/development/ruby-modules/with-packages/test.nix index b22e2931cf120..57b3e394813d4 100644 --- a/pkgs/development/ruby-modules/with-packages/test.nix +++ b/pkgs/development/ruby-modules/with-packages/test.nix @@ -5,8 +5,10 @@ let lib = pkgs.lib; stdenv = pkgs.stdenv; - rubyVersions = with pkgs; [ - ruby_3_2 + rubyVersions = [ + # TODO FIXME: All versions listed here were dropped from Nixpkgs. + # Add current versions here or remove this file if it’s no longer + # being used. ]; gemTests = (lib.mapAttrs (name: gem: [ name ]) pkgs.ruby.gems) // (import ./require_exceptions.nix); diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index bead703c539d1..9ba7cf1ac2068 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2354,6 +2354,10 @@ mapAliases { rquickshare-legacy = throw "The legacy version depends on insecure package libsoup2, please use the main version"; # Added 2025-10-09 rr-unstable = rr; # Added 2022-09-17 rtx = mise; # Added 2024-01-05 + ruby_3_1 = throw "ruby_3_1 has been removed, as it is has reached end‐of‐life upstream"; # Added 2025-10-12 + ruby_3_2 = throw "ruby_3_2 has been removed, as it will reach end‐of‐life upstream during Nixpkgs 25.11’s support cycle"; # Added 2025-10-12 + rubyPackages_3_1 = throw "rubyPackages_3_1 has been removed, as it is has reached end‐of‐life upstream"; # Added 2025-10-12 + rubyPackages_3_2 = throw "rubyPackages_3_2 has been removed, as it will reach end‐of‐life upstream during Nixpkgs 25.11’s support cycle"; # Added 2025-10-12 ruby-zoom = throw "'ruby-zoom' has been removed due to lack of maintaince and had not been updated since 2020"; # Added 2025-08-24 runCommandNoCC = runCommand; # Added 2021-08-15 runCommandNoCCLocal = runCommandLocal; # Added 2021-08-15 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea57e436c6df2..efe3ba4b71651 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6036,8 +6036,6 @@ with pkgs; }) mkRubyVersion mkRuby - ruby_3_1 - ruby_3_2 ruby_3_3 ruby_3_4 ruby_3_5 @@ -6046,8 +6044,6 @@ with pkgs; ruby = ruby_3_3; rubyPackages = rubyPackages_3_3; - rubyPackages_3_1 = recurseIntoAttrs ruby_3_1.gems; - rubyPackages_3_2 = recurseIntoAttrs ruby_3_2.gems; rubyPackages_3_3 = recurseIntoAttrs ruby_3_3.gems; rubyPackages_3_4 = recurseIntoAttrs ruby_3_4.gems; rubyPackages_3_5 = recurseIntoAttrs ruby_3_5.gems; @@ -14891,10 +14887,6 @@ with pkgs; libcpr = libcpr_1_10_5; }; - tree-from-tags = callPackage ../by-name/tr/tree-from-tags/package.nix { - ruby = ruby_3_1; - }; - biblioteca = callPackage ../by-name/bi/biblioteca/package.nix { webkitgtk = webkitgtk_6_0; }; diff --git a/pkgs/top-level/pkg-config/pkg-config-data.json b/pkgs/top-level/pkg-config/pkg-config-data.json index b8db6efa5aa50..a7a118056d37f 100644 --- a/pkgs/top-level/pkg-config/pkg-config-data.json +++ b/pkgs/top-level/pkg-config/pkg-config-data.json @@ -746,11 +746,6 @@ "python3" ] }, - "ruby-3.1": { - "attrPath": [ - "ruby_3_1" - ] - }, "sdl2": { "attrPath": [ "SDL2"