@ -201,6 +201,14 @@ let
nativeBuildInputs = [ self . gnutar ] ;
# Ourselves have offset -1. In order to make these offset -1 dependencies of downstream derivation,
# they are offset 0 propagated.
propagatedBuildInputs =
self . lib . optional ( pname == " r u s t c " ) [ self . stdenv . cc self . buildPackages . stdenv . cc ] ;
# This goes downstream packages' buildInputs.
depsTargetTargetPropagated =
self . lib . optional ( pname == " r u s t c " && self . stdenv . targetPlatform . isDarwin ) self . libiconv ;
installPhase = ''
runHook preInstall
installerVersion = $ ( < ./rust-installer-version )
@ -314,23 +322,8 @@ let
- - replace " @ c a r g o _ m i r i @ " " $ o u t / b i n / . c a r g o - m i r i - w r a p p e d " \
- - replace " @ o u t @ " " $ o u t "
fi
# `symlinkJoin` (`runCommand`) doesn't handle propagated dependencies.
# Need to do it manually.
mkdir - p " $ o u t / n i x - s u p p o r t "
echo " $ p r o p a g a t e d B u i l d I n p u t s " > " $ o u t / n i x - s u p p o r t / p r o p a g a t e d - b u i l d - i n p u t s "
if [ [ - n " $ p r o p a g a t e d N a t i v e B u i l d I n p u t s " ] ] ; then
echo " $ p r o p a g a t e d N a t i v e B u i l d I n p u t s " > " $ o u t / n i x - s u p p o r t / p r o p a g a t e d - n a t i v e - b u i l d - i n p u t s "
fi
'' ;
# FIXME: If these propagated dependencies go components, darwin build will fail with "`-liconv` not found".
# Ourselves have offset -1. In order to make these offset -1 dependencies of downstream derivation,
# they are offset 0 propagated.
propagatedBuildInputs = [ self . gcc self . buildPackages . gcc ] ++
self . lib . optional ( self . stdenv . targetPlatform . isDarwin ) self . targetPackages . libiconv ;
meta . platforms = self . lib . platforms . all ;
} ;