Merge pull request #69426 from ttuegel/closure-size/qt

Reduce closure size of Qt applications
This commit is contained in:
Thomas Tuegel 2019-09-26 05:23:26 -05:00 committed by GitHub
commit 02eec3e56a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 21 deletions

View File

@ -15,8 +15,8 @@ mkDerivation {
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ libgit2 ];
propagatedBuildInputs = [
buildInputs = [
libgit2
kactivities ki18n kio ktexteditor kwindowsystem plasma-framework
qtscript kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts
kxmlgui kdbusaddons kwallet kitemmodels knotifications threadweaver

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, makeWrapper,
mkDerivation, lib,
extra-cmake-modules, kdoctools,
kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons,
ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications,
@ -18,12 +18,7 @@ mkDerivation {
kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons kdelibs4support
kguiaddons ki18n kiconthemes kinit kio knotifications knotifyconfig kparts kpty
kservice ktextwidgets kwidgetsaddons kwindowsystem kxmlgui qtscript knewstuff
makeWrapper
];
postInstall = ''
wrapProgram $out/bin/konsole --prefix XDG_DATA_DIRS ":" $out/share
'';
propagatedUserEnvPkgs = [ (lib.getBin kinit) ];
}

View File

@ -13,6 +13,16 @@
with stdenv.lib;
let
extraPropagatedBuildInputs = [ ]
++ optionals x11Support [ libXext libICE libXrandr ]
++ optionals openglSupport [ libGL libGLU ]
++ optional alsaSupport alsaLib
++ optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa;
rpath = makeLibraryPath extraPropagatedBuildInputs;
in
stdenv.mkDerivation rec {
pname = "SDL";
version = "1.2.15";
@ -31,12 +41,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ]
++ optional stdenv.isLinux libcap;
propagatedBuildInputs = [ libiconv ]
++ optionals x11Support [ libXext libICE libXrandr ]
++ optionals openglSupport [ libGL libGLU ]
++ optional alsaSupport alsaLib
++ optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa;
propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
buildInputs = [ ]
++ optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
@ -108,7 +113,7 @@ stdenv.mkDerivation rec {
postFixup = ''
for lib in $out/lib/*.so* ; do
if [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib"
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
fi
done
'';

View File

@ -53,13 +53,12 @@ ecmPostHook() {
}
postHooks+=(ecmPostHook)
xdgDataSubdirs=(
"doc" "config.kcfg" "kconf_update" "kservices5" "kservicetypes5" \
xdgDataSubdirs=( \
"config.kcfg" "kconf_update" "kservices5" "kservicetypes5" \
"kxmlgui5" "knotifications5" "icons" "locale" "sounds" "templates" \
"wallpapers" "applications" "desktop-directories" "mime" "appdata" "dbus-1" \
)
ecmHostPathSeen=( )
ecmUnseenHostPath() {
@ -104,5 +103,10 @@ ecmHostPathHook() {
then
qtWrapperArgs+=(--prefix INFOPATH : "$infoDir")
fi
if [ -d "$1/dbus-1" ]
then
propagatedUserEnvPkgs+=" $1"
fi
}
addEnvHooks "$hostOffset" ecmHostPathHook
addEnvHooks "$targetOffset" ecmHostPathHook

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz";
sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc";
};
buildInputs = [];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [audiofile libtiff];
meta = {
homepage = http://www.creytiv.com/baresip.html;
@ -18,4 +18,3 @@ stdenv.mkDerivation rec {
updateWalker = true;
};
}

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkgconfig ];
# libsrtp.pc references -lcrypto -lpcap without -L

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation {
sha256 = "0m07gq4zfgigsiz8b518xyb19v7qqp76qmp7lb262825vkqzl3zq";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
propagatedBuildInputs = [ libogg ];

View File

@ -98,6 +98,8 @@ stdenv.mkDerivation rec {
})
];
outputs = [ "out" "dev" ];
postPatch = ''
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .

View File

@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
inherit mpi;
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ removeReferencesTo ];
buildInputs = []
@ -51,6 +53,7 @@ stdenv.mkDerivation rec {
postInstall = ''
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
moveToOutput bin/h5cc "''${!outputDev}"
'';
meta = {