diff options
Diffstat (limited to 'pkgs/development/interpreters')
4 files changed, 34 insertions, 6 deletions
diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index 9a1594da933..76f71745f35 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -121,8 +121,7 @@ in stdenv.mkDerivation ({ tolerance. ''; - # aarch64 is supposed to work but started failing in https://hydra.nixos.org/build/83735973 - platforms = subtractLists [ "aarch64-linux" ] platforms.unix; + platforms = platforms.unix; maintainers = with maintainers; [ the-kenny sjmackenzie couchemar gleber ]; license = licenses.asl20; } // meta); diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index d70c7e70f33..ee9b61259bb 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -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"; + }; + }; } diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 6fbb33b27fc..4838a1a09e5 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -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) + ]; } diff --git a/pkgs/development/interpreters/ruby/rubygems/default.nix b/pkgs/development/interpreters/ruby/rubygems/default.nix index 1042caa41ac..dd1db5a8450 100644 --- a/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -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 = [ |