rubyMinimal: ruby with all options disabled by default

Similar to `gitMinimal` or `pythonMinimal`, this is useful for scripts
which don’t use anything but the standard library and want a small
footprint.
This commit is contained in:
Profpatsch
2019-12-25 13:59:42 +01:00
parent 80c07f8aaf
commit 7d4c1ae7f1
2 changed files with 20 additions and 5 deletions
@@ -149,14 +149,14 @@ let
postInstall = ''
# Remove unnecessary groff reference from runtime closure, since it's big
sed -i '/NROFF/d' $out/lib/ruby/*/*/rbconfig.rb
${lib.optionalString removeReferenceToCC ''
${
lib.optionalString removeReferenceToCC ''
# Get rid of the CC runtime dependency
${removeReferencesTo}/bin/remove-references-to \
-t ${stdenv.cc} \
$out/lib/libruby.so.*
''}
$out/lib/libruby*
''
}
# Bundler tries to create this directory
mkdir -p $out/nix-support
cat > $out/nix-support/setup-hook <<EOF