diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index a53df02f9b9b..4ebc488d9988 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -136,6 +136,12 @@ let ++ op (stdenv.hostPlatform != stdenv.buildPlatform) "--with-baseruby=${buildRuby}"; + preInstall = '' + # Ruby installs gems here itself now. + mkdir -pv "$out/${passthru.gemPath}" + export GEM_HOME="$out/${passthru.gemPath}" + ''; + installFlags = stdenv.lib.optionalString docSupport "install-doc"; # Bundler tries to create this directory postInstall = '' @@ -148,7 +154,6 @@ let sed -i '/NROFF/d' $out/lib/ruby/*/*/rbconfig.rb # Bundler tries to create this directory - mkdir -pv $out/${passthru.gemPath} mkdir -p $out/nix-support cat > $out/nix-support/setup-hook <