Merge pull request #276528 from romildo/upd.colloid-kde

colloid-kde: make sddm a separate output
This commit is contained in:
José Romildo Malaquias 2023-12-31 11:29:59 -03:00 committed by GitHub
commit 239bc23d12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {