Merge pull request #101655 from zimbatm/ruby-r13y

ruby: make the build reproducible
This commit is contained in:
zimbatm 2020-10-27 19:29:37 +01:00 committed by GitHub
commit 5dc3838d05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -108,6 +108,9 @@ let
sed -i configure.ac -e '/config.guess/d'
cp --remove-destination ${config}/config.guess tool/
cp --remove-destination ${config}/config.sub tool/
# Make the build reproducible for ruby <= 2.7
# See https://github.com/ruby/io-console/commit/679a941d05d869f5e575730f6581c027203b7b26#diff-d8422f096931c58d4463e2489f62a228b0f24f0492950ba88c8c89a0d741cfe6
sed -i ext/io/console/io-console.gemspec -e '/s\.date/d'
'';
# Force the revision.h generation. Somehow `revision.tmp` is an empty

View file

@ -207,7 +207,7 @@ 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/*/*/*}/{mkmf.log,gem_make.out} || true
rm -fv {gems/*/ext/*,extensions/*/*/*}/{Makefile,mkmf.log,gem_make.out} || true
rm -fvr cache
popd