Skip to content

Commit 571092d

Browse files
authored
sddm-astronaut: refactor, update, reduce closure size, add qweered as a maintainer (#492325)
2 parents 910b676 + f052956 commit 571092d

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

pkgs/by-name/sd/sddm-astronaut/package.nix

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,61 @@
44
fetchFromGitHub,
55
kdePackages,
66
formats,
7+
nix-update-script,
78
themeConfig ? null,
89
embeddedTheme ? "astronaut",
910
}:
10-
stdenvNoCC.mkDerivation rec {
11+
let
12+
configFile = (formats.ini { }).generate "" { General = themeConfig; };
13+
basePath = "$out/share/sddm/themes/sddm-astronaut-theme";
14+
sedString = "ConfigFile=Themes/";
15+
in
16+
stdenvNoCC.mkDerivation {
1117
pname = "sddm-astronaut";
12-
version = "1.0-unstable-2025-01-05";
18+
version = "0-unstable-2025-12-06";
1319

1420
src = fetchFromGitHub {
1521
owner = "Keyitdev";
1622
repo = "sddm-astronaut-theme";
17-
rev = "11c0bf6147bbea466ce2e2b0559e9a9abdbcc7c3";
18-
hash = "sha256-gBSz+k/qgEaIWh1Txdgwlou/Lfrfv3ABzyxYwlrLjDk=";
23+
rev = "d73842c761f7d7859f3bdd80e4360f09180fad41";
24+
hash = "sha256-+94WVxOWfVhIEiVNWwnNBRmN+d1kbZCIF10Gjorea9M=";
1925
};
2026

2127
dontWrapQtApps = true;
2228

2329
propagatedBuildInputs = with kdePackages; [
24-
qtsvg
25-
qtmultimedia
26-
qtvirtualkeyboard
30+
# avoid .dev outputs propagation
31+
qtsvg.out
32+
qtmultimedia.out
33+
qtvirtualkeyboard.out
2734
];
2835

29-
installPhase =
30-
let
31-
iniFormat = formats.ini { };
32-
configFile = iniFormat.generate "" { General = themeConfig; };
36+
installPhase = ''
37+
mkdir -p ${basePath}
38+
cp -r $src/* ${basePath}
39+
''
40+
+ lib.optionalString (embeddedTheme != "astronaut") ''
3341
34-
basePath = "$out/share/sddm/themes/sddm-astronaut-theme";
35-
sedString = "ConfigFile=Themes/";
36-
in
37-
''
38-
mkdir -p ${basePath}
39-
cp -r $src/* ${basePath}
40-
''
41-
+ lib.optionalString (embeddedTheme != "astronaut") ''
42+
# Replaces astronaut.conf with embedded theme in metadata.desktop on line 9.
43+
# ConfigFile=Themes/astronaut.conf.
44+
sed -i "s|^${sedString}.*\\.conf$|${sedString}${embeddedTheme}.conf|" ${basePath}/metadata.desktop
45+
''
46+
+ lib.optionalString (themeConfig != null) ''
47+
chmod u+w ${basePath}/Themes/
48+
ln -sf ${configFile} ${basePath}/Themes/${embeddedTheme}.conf.user
49+
'';
4250

43-
# Replaces astronaut.conf with embedded theme in metadata.desktop on line 9.
44-
# ConfigFile=Themes/astronaut.conf.
45-
sed -i "s|^${sedString}.*\\.conf$|${sedString}${embeddedTheme}.conf|" ${basePath}/metadata.desktop
46-
''
47-
+ lib.optionalString (themeConfig != null) ''
48-
chmod u+w ${basePath}/Themes/
49-
ln -sf ${configFile} ${basePath}/Themes/${embeddedTheme}.conf.user
50-
'';
51+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
5152

5253
meta = {
5354
description = "Modern looking qt6 sddm theme";
54-
homepage = "https://github.com/${src.owner}/${src.repo}";
55+
homepage = "https://github.com/Keyitdev/sddm-astronaut-theme";
5556
license = lib.licenses.gpl3;
56-
5757
platforms = lib.platforms.linux;
5858
maintainers = with lib.maintainers; [
5959
danid3v
6060
uxodb
61+
qweered
6162
];
6263
};
6364
}

0 commit comments

Comments
 (0)