summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2017-03-22 07:14:59 -0500
committerThomas Tuegel <ttuegel@mailbox.org>2017-03-22 07:44:55 -0500
commit3de6ccd5b21e391c4fa324c94dd150e331a8474e (patch)
tree8a43353614f5c73ddeaf20892a6a46af440bad33
parent7aee677a1093aa5869a6a1bf5ecd6121f87534c8 (diff)
downloadnixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar.gz
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar.bz2
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar.lz
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar.xz
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.tar.zst
nixpkgs-3de6ccd5b21e391c4fa324c94dd150e331a8474e.zip
sddm: propagate qtbase input
-rw-r--r--pkgs/applications/display-managers/sddm/default.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix
index 9fd56a49b5f..019d3e97a6f 100644
--- a/pkgs/applications/display-managers/sddm/default.nix
+++ b/pkgs/applications/display-managers/sddm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeQtWrapper, fetchFromGitHub, fetchpatch
+{ stdenv, lib, makeQtWrapper, fetchFromGitHub, fetchpatch
 , cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs, lndir
 , libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
 , themes
@@ -28,10 +28,13 @@ let
     nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ];
 
     buildInputs = [
-      libxcb libpthreadstubs libXdmcp libXau qtbase pam systemd
+      libxcb libpthreadstubs libXdmcp libXau pam systemd
+      qtbase qtdeclarative
     ];
 
-    propagatedBuildInputs = [ qtdeclarative ];
+    propagatedUserEnvPkgs = builtins.map lib.getBin [
+      qtbase qtdeclarative
+    ];
 
     cmakeFlags = [
       "-DCONFIG_FILE=/etc/sddm.conf"
@@ -80,6 +83,21 @@ stdenv.mkDerivation {
   installPhase = ''
     runHook preInstall
 
+    propagated=
+    for i in $unwrapped $themes; do
+      findInputs $i propagated propagated-user-env-packages
+      if [ -z "$crossConfig" ]; then
+          findInputs $i propagated propagated-native-build-inputs
+      else
+          findInputs $i propagated propagated-build-inputs
+      fi
+    done
+
+    for pkg in $propagated; do
+      addToSearchPath RUNTIME_XDG_DATA_DIRS "$pkg/share"
+      addToSearchPath RUNTIME_XDG_CONFIG_DIRS "$pkg/etc/xdg"
+    done
+
     makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm"
 
     mkdir -p "$out/share/sddm"