3
0
Fork 0
forked from mirrors/nixpkgs

rename moveToOutput and propagatedBuildInputs

This commit is contained in:
Luca Bruno 2015-12-02 10:03:23 +01:00
parent 0d2ac2b08c
commit e289717414
26 changed files with 53 additions and 53 deletions

View file

@ -69,8 +69,8 @@ NIX_NO_SELF_RPATH=1
# Move subpaths that match pattern $1 from under any output/ to the $2 output/
# Beware: only globbing patterns are accepted, e.g.: * ? {foo,bar}
# A special target "REMOVE" is allowed: _moveToOutput foo REMOVE
_moveToOutput() {
# A special target "REMOVE" is allowed: moveToOutput foo REMOVE
moveToOutput() {
local patt="$1"
local dstOut="$2"
local output
@ -117,24 +117,24 @@ _multioutDocs() {
if [ "$outputs" = "out" ]; then return; fi;
local REMOVE=REMOVE # slightly hacky - we expand ${!outputFoo}
_moveToOutput share/info "${!outputInfo}"
_moveToOutput share/doc "${!outputDoc}"
_moveToOutput share/gtk-doc "${!outputDocdev}"
moveToOutput share/info "${!outputInfo}"
moveToOutput share/doc "${!outputDoc}"
moveToOutput share/gtk-doc "${!outputDocdev}"
# the default outputMan is in $bin
_moveToOutput share/man "${!outputMan}"
_moveToOutput share/man/man3 "${!outputDocdev}"
moveToOutput share/man "${!outputMan}"
moveToOutput share/man/man3 "${!outputDocdev}"
}
# Move development-only stuff to the desired outputs.
_multioutDevs() {
if [ "$outputs" = "out" ] || [ -z "${moveToDev-1}" ]; then return; fi;
_moveToOutput include "${!outputInclude}"
moveToOutput include "${!outputInclude}"
# these files are sometimes provided even without using the corresponding tool
_moveToOutput lib/pkgconfig "${!outputDev}"
_moveToOutput share/pkgconfig "${!outputDev}"
_moveToOutput lib/cmake "${!outputDev}"
_moveToOutput share/aclocal "${!outputDev}"
moveToOutput lib/pkgconfig "${!outputDev}"
moveToOutput share/pkgconfig "${!outputDev}"
moveToOutput lib/cmake "${!outputDev}"
moveToOutput share/aclocal "${!outputDev}"
# don't move *.la, as libtool needs them in the directory of the library
for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; do
@ -156,22 +156,22 @@ _multioutPropagateDev() {
done
# Default value: propagate binaries, includes and libraries
if [ -z "${propagatedOutputs+1}" ]; then
if [ -z "${propagatedBuildOutputs+1}" ]; then
local po_dirty="$outputBin $outputInclude $outputLib"
set +o pipefail
propagatedOutputs=`echo "$po_dirty" \
propagatedBuildOutputs=`echo "$po_dirty" \
| tr -s ' ' '\n' | grep -v -F "$outputFirst" \
| sort -u | tr '\n' ' ' `
set -o pipefail
fi
# The variable was explicitly set to empty or we resolved it so
if [ -z "$propagatedOutputs" ]; then
if [ -z "$propagatedBuildOutputs" ]; then
return
fi
mkdir -p "${!outputFirst}"/nix-support
for output in $propagatedOutputs; do
for output in $propagatedBuildOutputs; do
echo -n " ${!output}" >> "${!outputFirst}"/nix-support/propagated-native-build-inputs
done
}

View file

@ -211,10 +211,10 @@ preInstall() {
postInstall() {
# Move runtime libraries to $lib.
_moveToOutput "lib/lib*.so*" "$lib"
_moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
ln -s lib "$lib/lib64" # for *.la
_moveToOutput "share/gcc-*/python" "$lib"
moveToOutput "share/gcc-*/python" "$lib"
for i in "$lib"/lib/*.{la,py}; do
substituteInPlace "$i" --replace "$out" "$lib"

View file

@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
postInstall = ''
rm "$lib"/lib/*.a # halve the output size
_moveToOutput "bin/js*-config" "$dev" # break the cycle
moveToOutput "bin/js*-config" "$dev" # break the cycle
'';
meta = with stdenv.lib; {

View file

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
postInstall = ''
rm "$lib"/lib/*.a # halve the output size
_moveToOutput "bin/js*-config" "$dev" # break the cycle
moveToOutput "bin/js*-config" "$dev" # break the cycle
'';
meta = with stdenv.lib; {

View file

@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
sha1 = "3137feb503a89a8d606405373905b92dcf7e293b";
}) ];
postFixup = ''_moveToOutput share/aclocal "$dev" '';
postFixup = ''moveToOutput share/aclocal "$dev" '';
crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
patches = let

View file

@ -65,7 +65,7 @@ self = stdenv.mkDerivation {
# it's executed from $lib by absolute path
postFixup = ''
_moveToOutput bin/dbus-launch "$lib"
moveToOutput bin/dbus-launch "$lib"
ln -s "$lib/bin/dbus-launch" "$out/bin/"
'';

View file

@ -153,8 +153,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postFixup = ''
_moveToOutput bin "$bin"
_moveToOutput share/ffmpeg/examples "$doc"
moveToOutput bin "$bin"
moveToOutput share/ffmpeg/examples "$doc"
'';
/* Cross-compilation is untested, consider this an outline, more work

View file

@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
DETERMINISTIC_BUILD = 1;
postInstall = ''
_moveToOutput "share/glib-2.0" "$dev"
moveToOutput "share/glib-2.0" "$dev"
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
'';

View file

@ -14,7 +14,7 @@ make_gobject_introspection_find_gir_files() {
envHooks+=(make_gobject_introspection_find_gir_files)
_multioutMoveGlibGir() {
_moveToOutput share/gir-1.0 "${!outputDev}"
moveToOutput share/gir-1.0 "${!outputDev}"
}
preFixupHooks+=(_multioutMoveGlibGir)

View file

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
else "--with-xinput=yes";
postInstall = ''
_moveToOutput share/gtk-2.0/demo "$docdev"
moveToOutput share/gtk-2.0/demo "$docdev"
'';
passthru = {

View file

@ -40,7 +40,7 @@ stdenv.mkDerivation {
sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc
'';
postFixup = ''_moveToOutput lib/icu "$dev" '';
postFixup = ''moveToOutput lib/icu "$dev" '';
enableParallelBuilding = true;

View file

@ -81,7 +81,7 @@ let
setOutputFlags = false;
# move tools away to lighten runtime deps and size
postInstall = ''_moveToOutput bin "$bin" '';
postInstall = ''moveToOutput bin "$bin" '';
doInstallCheck = false; # fails randomly
installCheckTarget = "check"; # tests need to be run *after* installation

View file

@ -149,7 +149,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''_moveToOutput bin "$bin" '';
postInstall = ''moveToOutput bin "$bin" '';
crossAttrs = let
isCygwin = stdenv.cross.libc == "msvcrt";

View file

@ -150,7 +150,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postInstall = ''_moveToOutput bin "$bin" '';
postInstall = ''moveToOutput bin "$bin" '';
crossAttrs = let
isCygwin = stdenv.cross.libc == "msvcrt";

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
outputs = [ "dev" "out" "bin" "doc" "py" ];
propagatedOutputs = "out bin py";
propagatedBuildOutputs = "out bin py";
buildInputs = [ python ]
# Libxml2 has an optional dependency on liblzma. However, on impure
@ -32,9 +32,9 @@ stdenv.mkDerivation rec {
installFlags = ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"'';
postFixup = ''
_moveToOutput bin/xml2-config "$dev"
_moveToOutput lib/xml2Conf.sh "$dev"
_moveToOutput share/man/man1 "$bin"
moveToOutput bin/xml2-config "$dev"
moveToOutput lib/xml2Conf.sh "$dev"
moveToOutput share/man/man1 "$bin"
'';
passthru = { inherit version; pythonSupport = true; };

View file

@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
];
postFixup = ''
_moveToOutput bin/xslt-config "$dev"
_moveToOutput lib/xsltConf.sh "$dev"
_moveToOutput share/man/man1 "$bin"
moveToOutput bin/xslt-config "$dev"
moveToOutput lib/xsltConf.sh "$dev"
moveToOutput share/man/man1 "$bin"
'';
meta = with stdenv.lib; {

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation {
postInstall = ''
find $out -name "*.a" -delete
_moveToOutput share "$dev" # just aclocal
moveToOutput share "$dev" # just aclocal
'';
enableParallelBuilding = true;

View file

@ -77,9 +77,9 @@ in stdenv.mkDerivation rec {
LD_LIBRARY_PATH=$out/lib $out/bin/shlibsign -v -i "$libfile"
done
_moveToOutput bin "$tools"
_moveToOutput bin/nss-config "$dev"
_moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
moveToOutput bin "$tools"
moveToOutput bin/nss-config "$dev"
moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
rm "$out"/lib/*.a
'';

View file

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
# we are running out of stack on both freeBSDs on Hydra
postFixup = ''
_moveToOutput bin/pcre-config "$dev"
moveToOutput bin/pcre-config "$dev"
''
+ optionalString (variant != null) ''
ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.so.*.*.*

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
configureFlags = stdenv.lib.optional (!static) "--shared";
postInstall = ''
_moveToOutput lib/libz.a "$static"
moveToOutput lib/libz.a "$static"
''
# jww (2015-01-06): Sometimes this library install as a .so, even on
# Darwin; others time it installs as a .dylib. I haven't yet figured out

View file

@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
preInstall = ''mkdir "$doc" '';
postInstall = ''_moveToOutput "share/cmake-*/Help" "$doc" '';
postInstall = ''moveToOutput "share/cmake-*/Help" "$doc" '';
meta = with stdenv.lib; {
homepage = http://www.cmake.org/;

View file

@ -74,7 +74,7 @@ let
installsFirmware = (config.isEnabled "FW_LOADER") &&
(isModular || (config.isDisabled "FIRMWARE_IN_KERNEL"));
in (optionalAttrs isModular { outputs = [ "out" "dev" ]; propagatedOutputs = ""; }) // {
in (optionalAttrs isModular { outputs = [ "out" "dev" ]; propagatedBuildOutputs = ""; }) // {
passthru = {
inherit version modDirVersion config kernelPatches configfile;
};

View file

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "libudev" "doc" ]; # maybe: "dev"
# note: there are many references to ${systemd}/...
outputDev = "out";
propagatedOutputs = "libudev";
propagatedBuildOutputs = "libudev";
*/
outputs = [ "out" "man" ];

View file

@ -114,7 +114,7 @@ stdenv.mkDerivation rec {
rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la
''
+ ''_moveToOutput lib/cmake "$dev" '';
+ ''moveToOutput lib/cmake "$dev" '';
meta = {
description = "Sound server for POSIX and Win32 systems";

View file

@ -40,9 +40,9 @@ let
postInstall =
''
_moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
_moveToOutput "lib/*.a" "$out"
_moveToOutput "lib/libecpg*" "$out"
moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
moveToOutput "lib/*.a" "$out"
moveToOutput "lib/libecpg*" "$out"
# Prevent a retained dependency on gcc-wrapper.
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld

View file

@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
CXXCPP = "g++ -E";
postInstall = ''
_moveToOutput bin/curl-config "$dev"
moveToOutput bin/curl-config "$dev"
sed '/^dependency_libs/s|${libssh2.dev}|${libssh2.out}|' -i "$out"/lib/*.la
'';