Merge branch 'kde-propagate'

+66 -20
+2
nixos/modules/services/x11/desktop-managers/kde5.nix
··· 170 170 services.xserver.displayManager.sddm = { 171 171 theme = "breeze"; 172 172 themes = [ 173 + kde5.extra-cmake-modules # for the setup-hook 173 174 kde5.plasma-workspace 175 + kde5.breeze-icons 174 176 (kde5.oxygen-icons or kde5.oxygen-icons5) 175 177 ]; 176 178 };
+8 -1
pkgs/applications/display-managers/sddm/default.nix
··· 68 68 69 69 stdenv.mkDerivation { 70 70 name = "sddm-${version}"; 71 - phases = "installPhase"; 72 71 73 72 nativeBuildInputs = [ lndir makeQtWrapper ]; 74 73 buildInputs = [ unwrapped ] ++ themes; 75 74 themes = map (pkg: pkg.out or pkg) themes; 76 75 inherit unwrapped; 76 + 77 + unpackPhase = "true"; 78 + configurePhase = "runHook preConfigure; runHook postConfigure"; 79 + buildPhase = "runHook preBuild; runHook postBuild"; 77 80 78 81 installPhase = '' 82 + runHook preInstall 83 + 79 84 makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm" 80 85 81 86 mkdir -p "$out/share/sddm" ··· 85 90 lndir -silent "$sddmDir" "$out/share/sddm" 86 91 fi 87 92 done 93 + 94 + runHook postInstall 88 95 ''; 89 96 90 97 inherit (unwrapped) meta;
+35 -17
pkgs/desktops/kde-5/frameworks-5.22/extra-cmake-modules/setup-hook.sh
··· 4 4 addToSearchPathOnce NIX_WRAP_XDG_CONFIG_DIRS "$1/etc/xdg" 5 5 } 6 6 7 - _ecmPropagateSharedData() { 8 - local sharedPaths=( \ 9 - "config.cfg" \ 10 - "kconf_update" \ 11 - "kservices5" \ 12 - "kservicetypes5" \ 13 - "knotifications5" \ 14 - "applications" \ 15 - "desktop-directories" \ 16 - "mime" \ 17 - "dbus-1" \ 18 - "interfaces" \ 19 - "services" \ 20 - "system-services" ) 21 - for dir in ${sharedPaths[@]}; do 7 + _ecmSharePaths=( \ 8 + "config.cfg" \ 9 + "kconf_update" \ 10 + "kservices5" \ 11 + "kservicetypes5" \ 12 + "knotifications5" \ 13 + "applications" \ 14 + "desktop-directories" \ 15 + "mime" \ 16 + "dbus-1" \ 17 + "interfaces" \ 18 + "services" \ 19 + "system-services" ) 20 + 21 + _ecmPropagateNative() { 22 + for dir in ${_ecmSharePaths[@]}; do 23 + if [ -d "$1/share/$dir" ]; then 24 + propagateOnce propagatedNativeBuildInputs "$1" 25 + if [ -z "$crossConfig" ]; then 26 + propagateOnce propagatedUserEnvPkgs "$1" 27 + addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" 28 + fi 29 + break 30 + fi 31 + done 32 + } 33 + 34 + envHooks+=(_ecmSetXdgDirs _ecmPropagate) 35 + 36 + _ecmPropagate() { 37 + for dir in ${_ecmSharePaths[@]}; do 22 38 if [ -d "$1/share/$dir" ]; then 23 - addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" 39 + propagateOnce propagatedBuildInputs "$1" 24 40 propagateOnce propagatedUserEnvPkgs "$1" 41 + addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" 25 42 break 26 43 fi 27 44 done 28 45 } 46 + 47 + crossEnvHooks+=(_ecmPropagate) 29 48 30 49 _ecmConfig() { 31 50 # Because we need to use absolute paths here, we must set *all* the paths. ··· 70 89 cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart" 71 90 } 72 91 73 - envHooks+=(_ecmSetXdgDirs _ecmPropagateSharedData) 74 92 preConfigureHooks+=(_ecmConfig)
+21 -2
pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh
··· 24 24 addToSearchPathOnceWithCustomDelimiter ' ' "$@" 25 25 } 26 26 27 - _qtPropagateRuntimeDependencies() { 27 + _qtPropagate() { 28 28 for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do 29 29 if [ -d "$1/$dir" ]; then 30 30 propagateOnce propagatedBuildInputs "$1" ··· 37 37 addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" 38 38 } 39 39 40 - envHooks+=(_qtPropagateRuntimeDependencies) 40 + crossEnvHooks+=(_qtPropagate) 41 + 42 + _qtPropagateNative() { 43 + for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do 44 + if [ -d "$1/$dir" ]; then 45 + propagateOnce propagatedNativeBuildInputs "$1" 46 + if [ -z "$crossConfig" ]; then 47 + propagateOnce propagatedUserEnvPkgs "$1" 48 + fi 49 + break 50 + fi 51 + done 52 + if [ -z "$crossConfig" ]; then 53 + addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" 54 + addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" 55 + addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" 56 + fi 57 + } 58 + 59 + envHooks+=(_qtPropagateNative) 41 60 42 61 _qtMultioutDevs() { 43 62 # This is necessary whether the package is a Qt module or not