forked from mirrors/nixpkgs
Revert "stdenv: Store one package per line in nix-support/propagated-*"
As @oxij points out in [1], this breakage is especially serious because
it changes the contents of built environments without a corresonding
change in their hashes. Also, the revert is easier than I thought.
This reverts commit 3cb745d5a6
.
[1]: https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
This commit is contained in:
parent
f4a8e6ab7f
commit
b087618ac0
pkgs
build-support
desktops/kde-4.14/kde-package
development
compilers
haskell-modules
misc
stdenv/generic
|
@ -275,9 +275,9 @@ stdenv.mkDerivation {
|
||||||
# Propagate the wrapped cc so that if you install the wrapper,
|
# Propagate the wrapped cc so that if you install the wrapper,
|
||||||
# you get tools like gcov, the manpages, etc. as well (including
|
# you get tools like gcov, the manpages, etc. as well (including
|
||||||
# for binutils and Glibc).
|
# for binutils and Glibc).
|
||||||
printLines ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
|
echo ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
|
||||||
|
|
||||||
printLines ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
|
echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
|
||||||
''
|
''
|
||||||
|
|
||||||
+ optionalString (targetPlatform.isSunOS && nativePrefix != "") ''
|
+ optionalString (targetPlatform.isSunOS && nativePrefix != "") ''
|
||||||
|
|
|
@ -211,5 +211,5 @@ cp -p $utils $out/nix-support/utils.sh
|
||||||
# tools like gcov, the manpages, etc. as well (including for binutils
|
# tools like gcov, the manpages, etc. as well (including for binutils
|
||||||
# and Glibc).
|
# and Glibc).
|
||||||
if test -z "$nativeTools"; then
|
if test -z "$nativeTools"; then
|
||||||
printLines $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages
|
echo $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -202,7 +202,7 @@ _multioutPropagateDev() {
|
||||||
|
|
||||||
mkdir -p "${!propagaterOutput}"/nix-support
|
mkdir -p "${!propagaterOutput}"/nix-support
|
||||||
for output in $propagatedBuildOutputs; do
|
for output in $propagatedBuildOutputs; do
|
||||||
echo "${!output}" >> "${!propagaterOutput}"/nix-support/$propagatedBuildInputsFile
|
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/$propagatedBuildInputsFile
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ rec {
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
cp ${script} $out/nix-support/setup-hook
|
cp ${script} $out/nix-support/setup-hook
|
||||||
'' + lib.optionalString (deps != []) ''
|
'' + lib.optionalString (deps != []) ''
|
||||||
printLines ${toString deps} > $out/nix-support/propagated-native-build-inputs
|
echo ${toString deps} > $out/nix-support/propagated-native-build-inputs
|
||||||
'' + lib.optionalString (substitutions != {}) ''
|
'' + lib.optionalString (substitutions != {}) ''
|
||||||
substituteAll ${script} $out/nix-support/setup-hook
|
substituteAll ${script} $out/nix-support/setup-hook
|
||||||
'');
|
'');
|
||||||
|
|
|
@ -86,7 +86,7 @@ rec {
|
||||||
};})
|
};})
|
||||||
''
|
''
|
||||||
mkdir -pv $out/nix-support
|
mkdir -pv $out/nix-support
|
||||||
printLines ${toString list} | tee $out/nix-support/propagated-user-env-packages
|
echo "${toString list}" | tee $out/nix-support/propagated-user-env-packages
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Given manifest module data, return the module
|
# Given manifest module data, return the module
|
||||||
|
|
|
@ -33,7 +33,7 @@ let
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
# any package that depends on the JRE has $CLASSPATH set up
|
||||||
# properly.
|
# properly.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
|
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ let
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
# any package that depends on the JRE has $CLASSPATH set up
|
||||||
# properly.
|
# properly.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
|
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ let
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
# any package that depends on the JRE has $CLASSPATH set up
|
||||||
# properly.
|
# properly.
|
||||||
mkdir -p $jre/nix-support
|
mkdir -p $jre/nix-support
|
||||||
printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
|
|
@ -202,7 +202,7 @@ let
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
# any package that depends on the JRE has $CLASSPATH set up
|
||||||
# properly.
|
# properly.
|
||||||
mkdir -p $jre/nix-support
|
mkdir -p $jre/nix-support
|
||||||
printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
|
|
@ -165,7 +165,7 @@ let result = stdenv.mkDerivation rec {
|
||||||
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
|
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> $out/nix-support/setup-hook
|
cat <<EOF >> $out/nix-support/setup-hook
|
||||||
|
|
|
@ -54,7 +54,7 @@ in stdenv.mkDerivation rec {
|
||||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
|
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> $out/nix-support/setup-hook
|
cat <<EOF >> $out/nix-support/setup-hook
|
||||||
|
|
|
@ -311,7 +311,7 @@ stdenv.mkDerivation ({
|
||||||
${optionalString isGhcjs ''
|
${optionalString isGhcjs ''
|
||||||
for exeDir in "$out/bin/"*.jsexe; do
|
for exeDir in "$out/bin/"*.jsexe; do
|
||||||
exe="''${exeDir%.jsexe}"
|
exe="''${exeDir%.jsexe}"
|
||||||
printLines '#!${nodejs}/bin/node' > "$exe"
|
printf '%s\n' '#!${nodejs}/bin/node' > "$exe"
|
||||||
cat "$exeDir/all.js" >> "$exe"
|
cat "$exeDir/all.js" >> "$exe"
|
||||||
chmod +x "$exe"
|
chmod +x "$exe"
|
||||||
done
|
done
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
*/
|
*/
|
||||||
collection = {list, name} : runCommand "collection-${name}" {} ''
|
collection = {list, name} : runCommand "collection-${name}" {} ''
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printLines ${builtins.toString list} > $out/nix-support/propagated-user-env-packages
|
echo ${builtins.toString list} > $out/nix-support/propagated-user-env-packages
|
||||||
'';
|
'';
|
||||||
|
|
||||||
/* creates a derivation symlinking references C/C++ libs into one include and lib directory called $out/cdt-envs/${name}
|
/* creates a derivation symlinking references C/C++ libs into one include and lib directory called $out/cdt-envs/${name}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
export PATH=
|
||||||
for i in $initialPath; do
|
for i in $initialPath; do
|
||||||
if [ "$i" = / ]; then i=; fi
|
if [ "$i" = / ]; then i=; fi
|
||||||
PATH=$PATH${PATH:+:}$i/bin
|
PATH=$PATH${PATH:+:}$i/bin
|
||||||
|
@ -14,6 +15,4 @@ cat "$setup" >> $out/setup
|
||||||
# Allow the user to install stdenv using nix-env and get the packages
|
# Allow the user to install stdenv using nix-env and get the packages
|
||||||
# in stdenv.
|
# in stdenv.
|
||||||
mkdir $out/nix-support
|
mkdir $out/nix-support
|
||||||
if [ "$propagatedUserEnvPkgs" ]; then
|
echo $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
|
||||||
printf '%s\n' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
|
|
||||||
fi
|
|
||||||
|
|
|
@ -215,11 +215,6 @@ isScript() {
|
||||||
if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi
|
if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# printf unfortunately will print a trailing newline regardless
|
|
||||||
printLines() {
|
|
||||||
[[ $# -gt 0 ]] || return 0
|
|
||||||
printf '%s\n' "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Initialisation.
|
# Initialisation.
|
||||||
|
@ -305,12 +300,9 @@ findInputs() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
|
if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then
|
||||||
local fd pkgNext
|
for i in $(cat "$pkg/nix-support/$propagatedBuildInputsFile"); do
|
||||||
exec {fd}<"$pkg/nix-support/$propagatedBuildInputsFile"
|
findInputs "$i" $var $propagatedBuildInputsFile
|
||||||
while IFS= read -r -u $fd pkgNext; do
|
|
||||||
findInputs "$pkgNext" $var $propagatedBuildInputsFile
|
|
||||||
done
|
done
|
||||||
exec {fd}<&-
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,17 +794,17 @@ fixupPhase() {
|
||||||
fi
|
fi
|
||||||
if [ -n "$propagated" ]; then
|
if [ -n "$propagated" ]; then
|
||||||
mkdir -p "${!outputDev}/nix-support"
|
mkdir -p "${!outputDev}/nix-support"
|
||||||
printLines $propagated > "${!outputDev}/nix-support/propagated-native-build-inputs"
|
echo "$propagated" > "${!outputDev}/nix-support/propagated-native-build-inputs"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -n "$propagatedBuildInputs" ]; then
|
if [ -n "$propagatedBuildInputs" ]; then
|
||||||
mkdir -p "${!outputDev}/nix-support"
|
mkdir -p "${!outputDev}/nix-support"
|
||||||
printLines $propagatedBuildInputs > "${!outputDev}/nix-support/propagated-build-inputs"
|
echo "$propagatedBuildInputs" > "${!outputDev}/nix-support/propagated-build-inputs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$propagatedNativeBuildInputs" ]; then
|
if [ -n "$propagatedNativeBuildInputs" ]; then
|
||||||
mkdir -p "${!outputDev}/nix-support"
|
mkdir -p "${!outputDev}/nix-support"
|
||||||
printLines $propagatedNativeBuildInputs > "${!outputDev}/nix-support/propagated-native-build-inputs"
|
echo "$propagatedNativeBuildInputs" > "${!outputDev}/nix-support/propagated-native-build-inputs"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -825,7 +817,7 @@ fixupPhase() {
|
||||||
|
|
||||||
if [ -n "$propagatedUserEnvPkgs" ]; then
|
if [ -n "$propagatedUserEnvPkgs" ]; then
|
||||||
mkdir -p "${!outputBin}/nix-support"
|
mkdir -p "${!outputBin}/nix-support"
|
||||||
printLines $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages"
|
echo "$propagatedUserEnvPkgs" > "${!outputBin}/nix-support/propagated-user-env-packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
runHook postFixup
|
runHook postFixup
|
||||||
|
|
Loading…
Reference in a new issue