diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index 20667988548c..c8dba5142082 100644 --- a/pkgs/development/ruby-modules/gem/default.nix +++ b/pkgs/development/ruby-modules/gem/default.nix @@ -217,8 +217,8 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // { # looks like useless files which break build repeatability and consume space pushd $out/${ruby.gemPath} - rm -fv doc/*/*/created.rid || true - rm -fv {gems/*/ext/*,extensions/*/*/*}/{Makefile,mkmf.log,gem_make.out} || true + find doc/ -iname created.rid -delete -print + find gems/*/ext/ extensions/ \( -iname Makefile -o -iname mkmf.log -o -iname gem_make.out \) -delete -print ${if keepGemCache then "" else "rm -fvr cache"} popd