Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce closure size of Qt applications (backport) #69427

Merged
merged 10 commits into from
Sep 26, 2019
4 changes: 2 additions & 2 deletions pkgs/applications/kde/kate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions pkgs/applications/kde/konsole.nix
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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) ];
}
19 changes: 12 additions & 7 deletions pkgs/development/libraries/SDL/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand Down Expand Up @@ -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
'';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions pkgs/development/libraries/spandsp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,4 +18,3 @@ stdenv.mkDerivation rec {
updateWalker = true;
};
}

2 changes: 2 additions & 0 deletions pkgs/development/libraries/srtp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6";
};

outputs = [ "out" "dev" ];

nativeBuildInputs = [ pkgconfig ];

# libsrtp.pc references -lcrypto -lpcap without -L
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/tremor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ stdenv.mkDerivation {
sha256 = "0m07gq4zfgigsiz8b518xyb19v7qqp76qmp7lb262825vkqzl3zq";
};

outputs = [ "out" "dev" ];

nativeBuildInputs = [ autoreconfHook pkgconfig ];
propagatedBuildInputs = [ libogg ];

Expand Down
2 changes: 2 additions & 0 deletions pkgs/tools/inputmethods/ibus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
3 changes: 3 additions & 0 deletions pkgs/tools/misc/hdf5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
inherit mpi;
};

outputs = [ "out" "dev" ];

nativeBuildInputs = [ removeReferencesTo ];

buildInputs = []
Expand All @@ -51,6 +53,7 @@ stdenv.mkDerivation rec {

postInstall = ''
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
moveToOutput bin/h5cc "''${!outputDev}"
'';

meta = {
Expand Down