Created
May 11, 2018 21:19
-
-
Save 198d/b0e4c110f22500756c5923ca4418582e to your computer and use it in GitHub Desktop.
ruby_2_3 overrides for Ruby 2.3.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> { }; | |
let | |
rubyVersion = "2.3.6"; | |
rubygemsVersion = "2.7.6"; | |
rubygemsSrc = fetchurl { | |
url = "http://production.cf.rubygems.org/rubygems/rubygems-${rubygemsVersion}.tgz"; | |
sha256 = "1sqy6z1kngq91nxmv1hw4xhw1ycwx9s76hfbpcdlgkm9haji9xv7"; | |
}; | |
rubySrc = fetchurl { | |
url = "http://cache.ruby-lang.org/pub/ruby/2.3/ruby-${rubyVersion}.tar.gz"; | |
sha256 = "07jpa7fw1gyf069m7alf2b0zm53qm08w2ns45mhzmvgrg4r528l3"; | |
}; | |
rubygemsPatch = fetchpatch { | |
url = "https://github.com/zimbatm/rubygems/compare/v2.6.6...v2.6.6-nix.patch"; | |
sha256 = "0297rdb1m6v75q8665ry9id1s74p9305dv32l95ssf198liaihhd"; | |
}; | |
ruby_2_3_6 = pkgs.ruby_2_3.overrideAttrs (oldAttrs: rec { | |
name = "ruby-${version}"; | |
version = rubyVersion; | |
srcs = [ rubySrc rubygemsSrc ]; | |
sourceRoot = lib.removeSuffix ".tar.gz" rubySrc.name; | |
postUnpack = '' | |
cp -r ${lib.removeSuffix ".tgz" rubygemsSrc.name} ${sourceRoot}/rubygems | |
pushd ${sourceRoot}/rubygems | |
patch -p1 < ${rubygemsPatch} | |
popd | |
''; | |
}); | |
in | |
stdenv.mkDerivation { | |
name = "ruby-2.3.6-project"; | |
buildInputs = [ ruby_2_3_6 ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment