mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
stdenv multiple-outputs: fix cross-build propagation
Fixes #14817. The outputs weren't propagated correctly when cross-building.
This commit is contained in:
parent
9f8751528c
commit
f6dfbb692c
@ -162,8 +162,8 @@ _multioutDevs() {
|
||||
|
||||
# Make the first output (typically "dev") propagate other outputs needed for development.
|
||||
# Take the first, because that's what one gets when putting the package into buildInputs.
|
||||
# Note: during the build, probably only the "native" development packages are useful.
|
||||
# With current cross-building setup, all packages are "native" if not cross-building.
|
||||
# Note: with current cross-building setup, all packages are "native" if not cross-building;
|
||||
# however, if cross-building, the outputs are non-native. We have to choose the right file.
|
||||
_multioutPropagateDev() {
|
||||
if [ "$outputs" = "out" ]; then return; fi;
|
||||
|
||||
@ -188,8 +188,15 @@ _multioutPropagateDev() {
|
||||
fi
|
||||
|
||||
mkdir -p "${!outputFirst}"/nix-support
|
||||
local propagatedBuildInputsFile
|
||||
if [ -z "$crossConfig" ]; then
|
||||
propagatedBuildInputsFile=propagated-native-build-inputs
|
||||
else
|
||||
propagatedBuildInputsFile=propagated-build-inputs
|
||||
fi
|
||||
|
||||
for output in $propagatedBuildOutputs; do
|
||||
echo -n " ${!output}" >> "${!outputFirst}"/nix-support/propagated-native-build-inputs
|
||||
echo -n " ${!output}" >> "${!outputFirst}"/nix-support/$propagatedBuildInputsFile
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user