From 24eceb46b78f1d1e0b8807dceb26e1589c346ecc Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Fri, 18 Jun 2021 22:02:37 +0200 Subject: [PATCH] rakudo: remove references to stdenv.cc.cc Rakudo depends on gcc noticeably increasing closure size, this commit removes the references. Fixes #101097 --- pkgs/development/interpreters/rakudo/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/rakudo/default.nix b/pkgs/development/interpreters/rakudo/default.nix index 3d9d0b7e1346..fdb3a78a1b7e 100644 --- a/pkgs/development/interpreters/rakudo/default.nix +++ b/pkgs/development/interpreters/rakudo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, icu, zlib, gmp, lib, nqp }: +{ stdenv, fetchurl, perl, icu, zlib, gmp, lib, nqp, removeReferencesTo }: stdenv.mkDerivation rec { pname = "rakudo"; @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "11ixlqmvbb37abksdysg5r4lkbwzr486lkc0ssl3wca4iiy3mhgf"; }; + nativeBuildInputs = [ removeReferencesTo ]; + buildInputs = [ icu zlib gmp perl ]; configureScript = "perl ./Configure.pl"; configureFlags = [ @@ -16,6 +18,11 @@ stdenv.mkDerivation rec { "--with-nqp=${nqp}/bin/nqp" ]; + disallowedReferences = [ stdenv.cc.cc ]; + postFixup = '' + remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/share/perl6/runtime/dynext/libperl6_ops_moar.so)" + ''; + meta = with lib; { description = "Raku implementation on top of Moar virtual machine"; homepage = "https://rakudo.org";