diff --git a/flake.nix b/flake.nix index 217549e..23ba5f8 100644 --- a/flake.nix +++ b/flake.nix @@ -145,7 +145,18 @@ ruby -e 'puts "ok"' > $out ''; }; - } // (lib.optionalAttrs (with import ./lib/version-comparison.nix rubyVersion; greaterOrEqualTo "2.2") { + } // (lib.optionalAttrs (with versionComparison rubyVersion; greaterOrEqualTo "2.4") { + # Ruby <2.4 only supports openssl 1.0 and not openssl1.1. openssl 1.0 is not supported by nixpkgs + # anymore, so we will not support it here. + "${rubyName}-openssl" = { + nativeBuildInputs = [ + ruby + ]; + command = '' + ruby -e 'require "openssl"; puts OpenSSL::OPENSSL_VERSION' > $out + ''; + }; + }) // (lib.optionalAttrs (with versionComparison rubyVersion; greaterOrEqualTo "2.2") { "${rubyName}-bundlerEnv" = let gems = pkgs.bundlerEnv { name = "gemset"; diff --git a/ruby/overrides.nix b/ruby/overrides.nix index 2b1a393..09cf03c 100644 --- a/ruby/overrides.nix +++ b/ruby/overrides.nix @@ -24,7 +24,7 @@ } { condition = version: with versionComparison version; - lessThan "3.0.3"; + lessThan "3.1"; override = pkg: pkg.override { openssl = openssl_1_1; }; } {