ruby_{3_1,3_2}: drop (#451385)

This commit is contained in:
Thomas Gerbet
2025-10-12 20:14:46 +00:00
committed by GitHub
14 changed files with 65 additions and 122 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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 {
+33 -5
View File
@@ -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"
];
};
})
+10 -4
View File
@@ -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
@@ -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
+4 -2
View File
@@ -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";
};
}
-8
View File
@@ -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 = {
+8 -36
View File
@@ -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=";
@@ -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
#
@@ -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...
@@ -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 its no longer
# being used.
];
gemTests = (lib.mapAttrs (name: gem: [ name ]) pkgs.ruby.gems) // (import ./require_exceptions.nix);
+4
View File
@@ -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 endoflife upstream"; # Added 2025-10-12
ruby_3_2 = throw "ruby_3_2 has been removed, as it will reach endoflife upstream during Nixpkgs 25.11s support cycle"; # Added 2025-10-12
rubyPackages_3_1 = throw "rubyPackages_3_1 has been removed, as it is has reached endoflife upstream"; # Added 2025-10-12
rubyPackages_3_2 = throw "rubyPackages_3_2 has been removed, as it will reach endoflife upstream during Nixpkgs 25.11s 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
-8
View File
@@ -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;
};
@@ -746,11 +746,6 @@
"python3"
]
},
"ruby-3.1": {
"attrPath": [
"ruby_3_1"
]
},
"sdl2": {
"attrPath": [
"SDL2"