3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/ruby/rubygems.nix
Robin Gloster 5936d6dbbb Revert "rubygems: 2.4.8 -> 2.5.2"
This reverts commit 7e8faf022f.

This breaks the rake call in gitlab see
https://github.com/NixOS/nixpkgs/pull/13468#issuecomment-191286066
2016-03-02 15:25:35 +00:00

36 lines
818 B
Nix

{ stdenv, lib, fetchurl, makeWrapper, ruby }:
stdenv.mkDerivation rec {
name = "rubygems-${version}";
version = "2.4.8";
src = fetchurl {
url = "http://production.cf.rubygems.org/rubygems/${name}.tgz";
sha256 = "0pl4civyf0vhqsqbqaivvxrb3fsg8sid9a8jv5vfnk4hypz3ahss";
};
patches = [ ./gem_hook.patch ];
buildInputs = [ruby makeWrapper];
buildPhase = ":";
installPhase = ''
ruby setup.rb --prefix=$out/
wrapProgram $out/bin/gem --prefix RUBYLIB : $out/lib
find $out -type f -name "*.rb" |
xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
mkdir -pv $out/nix-support
cat > $out/nix-support/setup-hook <<EOF
export RUBYOPT=rubygems
addToSearchPath RUBYLIB $out/lib
EOF
'';
meta = {
description = "A package management framework for Ruby";
};
}