catppuccin / sddm

🔒 Soothing pastel theme for SDDM
MIT License
290 stars 17 forks source link

Can't install it in nixos unless changing the metadata to qt5 #30

Closed iuribrindeiro closed 3 months ago

iuribrindeiro commented 5 months ago

The theme doesn't seem to work if the metadata.desktop holds the QtVersion=6, as added in this PR.

After manually changing it to QtVersion=5 it just works. I'm not really sure why is this, but I wanted to leave this here in case someone else has the same issue.

My solution:

{ pkgs }:

pkgs.stdenv.mkDerivation {
  name = "catppuccin-macchiato";
  src = pkgs.fetchurl {
    url = "https://github.com/catppuccin/sddm/releases/download/v1.0.0/catppuccin-macchiato.zip";
    sha256 = "1yh4f9xdm81bp8qy2yl5nw35haicfczks958zqr5c68kzr6h6hsa";
  };

  dontUnpack = true;

  installPhase = ''
    mkdir -p $out
    mkdir ./temp
    ${pkgs.unzip}/bin/unzip $src -d ./temp
    cp -R ./temp/catppuccin-macchiato/* $out/
    rm $out/metadata.desktop
    echo "
[SddmGreeterTheme]
Name=Catppuccin macchiato
Description=Soothing pastel theme for SDDM
Type=sddm-theme
Version=2.1
Website=https://github.com/catppuccin/sddm
Screenshot=preview.png
MainScript=Main.qml
ConfigFile=theme.conf
TranslationsDirectory=translations
Theme-Id=Catppuccin
Theme-API=2.0
License=MIT
QtVersion=5" > $out/metadata.desktop
  '';

}
isabelroses commented 5 months ago

Might be worth looking at https://github.com/NixOS/nixpkgs/pull/296682, since this PR works for me.

ElysaSrc commented 5 months ago

Hello @iuribrindeiro, check the package you use for sddm. When using plasma6, it changes the version of sddm.

services.displayManager.sddm = {
  enable = true;
  wayland.enable = true;
  package = pkgs.kdePackages.sddm;
  theme = "catppuccin-mocha";
  extraPackages = with pkgs.kdePackages; [
    breeze-icons
    kirigami
    plasma5support
    qtsvg
    qtvirtualkeyboard
  ];
};
isabelroses commented 4 months ago

Since the upstream package has been merged, I assume it has been fixed. Please do let me know if it works.

ecarlson94 commented 4 months ago

This doesn't work for me either. In fact, this only works for NixOS users that use Qt (which I don't). I had to remove this line to get the theme to work. This tells me that we should remove this line from here and manage Qt support within the install phase of the catppuccin-sddm package instead (it should be opt in, I believe).

isabelroses commented 4 months ago

Just to reiterate my point from https://github.com/catppuccin/nix/pull/168#issuecomment-2111754109, such that everyone here can see it.

This seems like an issue you should take up with the upstream packager (nixpkgs). Since sddm is under the KDE banner so it makes sense for the catppuccin-sddm theme (and its maintainer, me) to ship it with the qt-platform set to 6 by default.