Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkgs/development/interpreters/ruby/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let
ver = version;
tag = ver.gitTag;
atLeast25 = lib.versionAtLeast ver.majMin "2.5";
atLeast27 = lib.versionAtLeast ver.majMin "2.7";
baseruby = self.override {
useRailsExpress = false;
docSupport = false;
Expand Down Expand Up @@ -116,6 +117,12 @@ let
cp ${config}/config.sub tool/
'';

# Force the revision.h generation. Somehow `revision.tmp` is an empty
# file and because we don't add `git` to buildInputs, hence the check is
# always true.
# https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae
buildFlags = lib.optionals atLeast27 [ "REVISION_LATEST=0" ];

configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby_${tag}"]
++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
++ op (!docSupport) "--disable-install-doc"
Expand Down Expand Up @@ -246,4 +253,12 @@ in {
git = "0pay6ic22ag3bnvxffhgwp7z6clkd0p93944a1l4lvc5hxc8v77j";
};
};

ruby_2_7 = generic {
version = rubyVersion "2" "7" "0" "";
sha256 = {
src = "1glc3zpnih6h8mrgfcak0aa7cgmi4zyvxfyi6y2brwg2nn9sm6cc";
git = "11iz64k95czs273mb10195d1j75mmbcgddfdx1vay5876ffw81dq";
};
};
}
2 changes: 2 additions & 0 deletions pkgs/development/interpreters/ruby/patchsets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
"${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch"
];
"2.7.0" = ops useRailsExpress [ # no patches yet (2019-12-25)
];
}
4 changes: 2 additions & 2 deletions pkgs/development/interpreters/ruby/rubygems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

stdenv.mkDerivation rec {
name = "rubygems";
version = "3.0.6";
version = "3.1.2";

src = fetchurl {
url = "https://rubygems.org/rubygems/rubygems-${version}.tgz";
sha256 = "1ca1i4xmggizr59m6p28gprlvshczsbx30q8iyzxb2vj4jn8arzx";
sha256 = "0h7ij4jpj8rgnpkl63cwh2lnav73pw5wpfqra3va7077lsyadlgd";
};

patches = [
Expand Down
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9352,7 +9352,8 @@ in
})
ruby_2_4
ruby_2_5
ruby_2_6;
ruby_2_6
ruby_2_7;

rubyMinimal = ruby.override {
# gem support is minimal overhead
Expand Down