diff --git a/pkgs/development/interpreters/ruby/ruby-1.9.3.nix b/pkgs/development/interpreters/ruby/ruby-1.9.3.nix index e361824bb532..77880870dd95 100644 --- a/pkgs/development/interpreters/ruby/ruby-1.9.3.nix +++ b/pkgs/development/interpreters/ruby/ruby-1.9.3.nix @@ -48,6 +48,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Fix a build failure on systems with nix store optimisation. + # (The build process attempted to copy file a overwriting file b, where a and + # b are hard-linked, which results in cp returning a non-zero exit code.) + # https://github.com/NixOS/nixpkgs/issues/4266 + postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"''; + patches = [ ./ruby19-parallel-install.patch ./bitperfect-rdoc.patch diff --git a/pkgs/development/interpreters/ruby/ruby-2.0.0.nix b/pkgs/development/interpreters/ruby/ruby-2.0.0.nix index 22b13717cfcb..4b1240ebf751 100644 --- a/pkgs/development/interpreters/ruby/ruby-2.0.0.nix +++ b/pkgs/development/interpreters/ruby/ruby-2.0.0.nix @@ -48,6 +48,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Fix a build failure on systems with nix store optimisation. + # (The build process attempted to copy file a overwriting file b, where a and + # b are hard-linked, which results in cp returning a non-zero exit code.) + # https://github.com/NixOS/nixpkgs/issues/4266 + postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"''; + patches = ops useRailsExpress [ "${patchSet}/patches/ruby/2.0.0/p481/01-zero-broken-tests.patch" "${patchSet}/patches/ruby/2.0.0/p481/02-railsexpress-gc.patch" diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.0.nix b/pkgs/development/interpreters/ruby/ruby-2.1.0.nix index fd0c278133bc..91c21016b242 100644 --- a/pkgs/development/interpreters/ruby/ruby-2.1.0.nix +++ b/pkgs/development/interpreters/ruby/ruby-2.1.0.nix @@ -49,6 +49,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Fix a build failure on systems with nix store optimisation. + # (The build process attempted to copy file a overwriting file b, where a and + # b are hard-linked, which results in cp returning a non-zero exit code.) + # https://github.com/NixOS/nixpkgs/issues/4266 + postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"''; + patches = ops useRailsExpress [ "${patchSet}/patches/ruby/2.1.0/railsexpress/01-current-2.1.1-fixes.patch" "${patchSet}/patches/ruby/2.1.0/railsexpress/02-zero-broken-tests.patch" diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.1.nix b/pkgs/development/interpreters/ruby/ruby-2.1.1.nix index c60a6cb313d4..e70678e27ecc 100644 --- a/pkgs/development/interpreters/ruby/ruby-2.1.1.nix +++ b/pkgs/development/interpreters/ruby/ruby-2.1.1.nix @@ -49,6 +49,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Fix a build failure on systems with nix store optimisation. + # (The build process attempted to copy file a overwriting file b, where a and + # b are hard-linked, which results in cp returning a non-zero exit code.) + # https://github.com/NixOS/nixpkgs/issues/4266 + postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"''; + patches = ops useRailsExpress [ "${patchSet}/patches/ruby/2.1.0/railsexpress/01-zero-broken-tests.patch" "${patchSet}/patches/ruby/2.1.0/railsexpress/02-improve-gc-stats.patch" diff --git a/pkgs/development/interpreters/ruby/ruby-2.1.2.nix b/pkgs/development/interpreters/ruby/ruby-2.1.2.nix index 1738606bf140..929a14f8242b 100644 --- a/pkgs/development/interpreters/ruby/ruby-2.1.2.nix +++ b/pkgs/development/interpreters/ruby/ruby-2.1.2.nix @@ -49,6 +49,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Fix a build failure on systems with nix store optimisation. + # (The build process attempted to copy file a overwriting file b, where a and + # b are hard-linked, which results in cp returning a non-zero exit code.) + # https://github.com/NixOS/nixpkgs/issues/4266 + postUnpack = ''rm "$sourceRoot/enc/unicode/name2ctype.h"''; + patches = ops useRailsExpress [ "${patchSet}/patches/ruby/2.1.2/railsexpress/01-zero-broken-tests.patch" "${patchSet}/patches/ruby/2.1.2/railsexpress/02-improve-gc-stats.patch"