From a30b8e10112766461a0359ed6606b1ad79de7c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 24 Dec 2023 16:28:14 -0300 Subject: [PATCH] colloid-kde: make sddm a separate output --- pkgs/data/themes/colloid-kde/default.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/data/themes/colloid-kde/default.nix b/pkgs/data/themes/colloid-kde/default.nix index 24cde3f38989..5393c54f7c33 100644 --- a/pkgs/data/themes/colloid-kde/default.nix +++ b/pkgs/data/themes/colloid-kde/default.nix @@ -18,13 +18,7 @@ stdenvNoCC.mkDerivation rec { hash = "sha256-AYH9fW20/p+mq6lxR1lcCV1BQ/kgcsjHncpMvYWXnWA="; }; - # Propagate sddm theme dependencies to user env otherwise sddm does - # not find them. Putting them in buildInputs is not enough. - propagatedUserEnvPkgs = [ - kdeclarative.bin - plasma-framework - plasma-workspace - ]; + outputs = [ "out" "sddm" ]; postPatch = '' patchShebangs install.sh @@ -34,12 +28,12 @@ stdenvNoCC.mkDerivation rec { --replace '$HOME/.config' $out/share substituteInPlace sddm/install.sh \ - --replace /usr $out \ + --replace /usr $sddm \ --replace '$(cd $(dirname $0) && pwd)' . \ --replace '"$UID" -eq "$ROOT_UID"' true substituteInPlace sddm/Colloid/Main.qml \ - --replace /usr $out + --replace /usr $sddm ''; installPhase = '' @@ -50,13 +44,23 @@ stdenvNoCC.mkDerivation rec { name= HOME="$TMPDIR" \ ./install.sh --dest $out/share/themes - mkdir -p $out/share/sddm/themes + mkdir -p $sddm/share/sddm/themes cd sddm source install.sh runHook postInstall ''; + postFixup = '' + # Propagate sddm theme dependencies to user env otherwise sddm + # does not find them. Putting them in buildInputs is not enough. + + mkdir -p $sddm/nix-support + + printWords ${kdeclarative.bin} ${plasma-framework} ${plasma-workspace} \ + >> $sddm/nix-support/propagated-user-env-packages + ''; + passthru.updateScript = gitUpdater { }; meta = with lib; {