Unverified Commit 571092df authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

sddm-astronaut: refactor, update, reduce closure size, add qweered as a maintainer (#492325)

parents 910b6768 f0529567
Loading
Loading
Loading
Loading
+30 −29
Original line number Diff line number Diff line
@@ -4,37 +4,36 @@
  fetchFromGitHub,
  kdePackages,
  formats,
  nix-update-script,
  themeConfig ? null,
  embeddedTheme ? "astronaut",
}:
stdenvNoCC.mkDerivation rec {
let
  configFile = (formats.ini { }).generate "" { General = themeConfig; };
  basePath = "$out/share/sddm/themes/sddm-astronaut-theme";
  sedString = "ConfigFile=Themes/";
in
stdenvNoCC.mkDerivation {
  pname = "sddm-astronaut";
  version = "1.0-unstable-2025-01-05";
  version = "0-unstable-2025-12-06";

  src = fetchFromGitHub {
    owner = "Keyitdev";
    repo = "sddm-astronaut-theme";
    rev = "11c0bf6147bbea466ce2e2b0559e9a9abdbcc7c3";
    hash = "sha256-gBSz+k/qgEaIWh1Txdgwlou/Lfrfv3ABzyxYwlrLjDk=";
    rev = "d73842c761f7d7859f3bdd80e4360f09180fad41";
    hash = "sha256-+94WVxOWfVhIEiVNWwnNBRmN+d1kbZCIF10Gjorea9M=";
  };

  dontWrapQtApps = true;

  propagatedBuildInputs = with kdePackages; [
    qtsvg
    qtmultimedia
    qtvirtualkeyboard
    # avoid .dev outputs propagation
    qtsvg.out
    qtmultimedia.out
    qtvirtualkeyboard.out
  ];

  installPhase =
    let
      iniFormat = formats.ini { };
      configFile = iniFormat.generate "" { General = themeConfig; };

      basePath = "$out/share/sddm/themes/sddm-astronaut-theme";
      sedString = "ConfigFile=Themes/";
    in
    ''
  installPhase = ''
    mkdir -p ${basePath}
    cp -r $src/* ${basePath}
  ''
@@ -49,15 +48,17 @@ stdenvNoCC.mkDerivation rec {
    ln -sf ${configFile} ${basePath}/Themes/${embeddedTheme}.conf.user
  '';

  passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

  meta = {
    description = "Modern looking qt6 sddm theme";
    homepage = "https://github.com/${src.owner}/${src.repo}";
    homepage = "https://github.com/Keyitdev/sddm-astronaut-theme";
    license = lib.licenses.gpl3;

    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [
      danid3v
      uxodb
      qweered
    ];
  };
}