Merge staging-next into staging
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
, zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, autoreconfHook, bison
|
||||
, autoconf, libiconv, libobjc, libunwind, Foundation
|
||||
, buildEnv, bundler, bundix
|
||||
, makeWrapper, buildRubyGem, defaultGemConfig
|
||||
, makeWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo
|
||||
} @ args:
|
||||
|
||||
let
|
||||
@@ -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;
|
||||
@@ -44,6 +45,11 @@ let
|
||||
, groff, docSupport ? true
|
||||
, libyaml, yamlSupport ? true
|
||||
, libffi, fiddleSupport ? true
|
||||
# ruby -e "puts RbConfig::CONFIG['configure_args']"
|
||||
# puts a reference to the C compiler in the binary.
|
||||
# This might be required by some gems at runtime,
|
||||
# but we allow to strip it out for smaller closure size.
|
||||
, removeReferencesTo, removeReferenceToCC ? false
|
||||
, autoreconfHook, bison, autoconf
|
||||
, buildEnv, bundler, bundix
|
||||
, libiconv, libobjc, libunwind, Foundation
|
||||
@@ -111,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"
|
||||
@@ -144,7 +156,14 @@ let
|
||||
postInstall = ''
|
||||
# Remove unnecessary groff reference from runtime closure, since it's big
|
||||
sed -i '/NROFF/d' $out/lib/ruby/*/*/rbconfig.rb
|
||||
|
||||
${
|
||||
lib.optionalString removeReferenceToCC ''
|
||||
# Get rid of the CC runtime dependency
|
||||
${removeReferencesTo}/bin/remove-references-to \
|
||||
-t ${stdenv.cc} \
|
||||
$out/lib/libruby*
|
||||
''
|
||||
}
|
||||
# Bundler tries to create this directory
|
||||
mkdir -p $out/nix-support
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
@@ -234,4 +253,12 @@ in {
|
||||
git = "0pay6ic22ag3bnvxffhgwp7z6clkd0p93944a1l4lvc5hxc8v77j";
|
||||
};
|
||||
};
|
||||
|
||||
ruby_2_7 = generic {
|
||||
version = rubyVersion "2" "7" "0" "";
|
||||
sha256 = {
|
||||
src = "1glc3zpnih6h8mrgfcak0aa7cgmi4zyvxfyi6y2brwg2nn9sm6cc";
|
||||
git = "11iz64k95czs273mb10195d1j75mmbcgddfdx1vay5876ffw81dq";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user