···4949 # puts a reference to the C compiler in the binary.
5050 # This might be required by some gems at runtime,
5151 # but we allow to strip it out for smaller closure size.
5252- , removeReferencesTo, removeReferenceToCC ? false
5252+ , removeReferencesTo, removeReferenceToCC ? true
5353 , autoreconfHook, bison, autoconf
5454 , buildEnv, bundler, bundix
5555 , libiconv, libobjc, libunwind, Foundation
···3939in
40404141{
4242+ asciidoctor-diagram = { version, ruby, ... }: {
4343+ postInstall = ''
4444+ # Delete vendored JAR files unless using JRuby.
4545+ if ruby -e 'exit(RUBY_PLATFORM != "java")'; then
4646+ rm -v $out/${ruby.gemPath}/gems/$gemName-${version}/lib/*.jar
4747+ fi
4848+ '';
4949+ };
5050+4251 atk = attrs: {
4352 dependencies = attrs.dependencies ++ [ "gobject-introspection" ];
4453 nativeBuildInputs = [ rake bundler pkgconfig ];
···314323315324 # The ruby build script takes care of this
316325 dontUseCmakeConfigure = true;
326326+327327+ postInstall = ''
328328+ # Reduce output size by a lot, and remove some unnecessary references.
329329+ # The ext directory should only be required at build time, so
330330+ # can be deleted now.
331331+ rm -r $out/${ruby.gemPath}/gems/mathematical-${attrs.version}/ext \
332332+ $out/${ruby.gemPath}/extensions/*/*/mathematical-${attrs.version}/gem_make.out
333333+ '';
317334318335 # For some reason 'mathematical.so' is missing cairo and glib in its RPATH, add them explicitly here
319336 postFixup = lib.optionalString stdenv.isLinux ''
+6-3
pkgs/development/ruby-modules/gem/default.nix
···3939, meta ? {}
4040, patches ? []
4141, gemPath ? []
4242-, dontStrip ? true
4242+, dontStrip ? false
4343# Assume we don't have to build unless strictly necessary (e.g. the source is a
4444# git checkout).
4545# If you need to apply patches, make sure to set `dontBuild = false`;
···205205 $gempkg $gemFlags -- $buildFlags
206206207207 # looks like useless files which break build repeatability and consume space
208208- rm -fv $out/${ruby.gemPath}/doc/*/*/created.rid || true
209209- rm -fv $out/${ruby.gemPath}/gems/*/ext/*/mkmf.log || true
208208+ pushd $out/${ruby.gemPath}
209209+ rm -fv doc/*/*/created.rid || true
210210+ rm -fv {gems/*/ext/*,extensions/*/*/*}/{mkmf.log,gem_make.out} || true
211211+ rm -fvr cache
212212+ popd
210213211214 # write out metadata and binstubs
212215 spec=$(echo $out/${ruby.gemPath}/specifications/*.gemspec)