Skip to content

Commit

Permalink
sddm-astronaut: 1.0 -> 1.0-unstable-2025-01-05
Browse files Browse the repository at this point in the history
  • Loading branch information
uxodb committed Jan 13, 2025
1 parent ddca1e6 commit f584f47
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkgs/data/themes/sddm-astronaut/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,44 @@
lib,
stdenvNoCC,
themeConfig ? null,
embeddedTheme ? "astronaut",
}:
stdenvNoCC.mkDerivation rec {
pname = "sddm-astronaut";
version = "1.0";
version = "1.0-unstable-2025-01-05";

src = pkgs.fetchFromGitHub {
owner = "Keyitdev";
repo = "sddm-astronaut-theme";
rev = "48ea0a792711ac0c58cc74f7a03e2e7ba3dc2ac0";
hash = "sha256-kXovz813BS+Mtbk6+nNNdnluwp/7V2e3KJLuIfiWRD0=";
rev = "11c0bf6147bbea466ce2e2b0559e9a9abdbcc7c3";
hash = "sha256-gBSz+k/qgEaIWh1Txdgwlou/Lfrfv3ABzyxYwlrLjDk=";
};

dontWrapQtApps = true;

propagatedBuildInputs = with pkgs.kdePackages; [
qt5compat
qtsvg
qtmultimedia
qtvirtualkeyboard
];

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

basePath = "$out/share/sddm/themes/sddm-astronaut-theme";
sedString = "ConfigFile=Themes/";
in
''
mkdir -p ${basePath}
cp -r $src/* ${basePath}
''
+ lib.optionalString (embeddedTheme != "astronaut") ''
sed -i "s|^${sedString}.*\\.conf$|${sedString}${embeddedTheme}.conf|" ${basePath}/metadata.desktop
''
+ lib.optionalString (themeConfig != null) ''
ln -sf ${configFile} ${basePath}/theme.conf.user
chmod u+w ${basePath}/Themes/
ln -sf ${configFile} ${basePath}/Themes/${embeddedTheme}.conf.user
'';

meta = {
Expand All @@ -42,6 +49,9 @@ stdenvNoCC.mkDerivation rec {
license = lib.licenses.gpl3;

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

0 comments on commit f584f47

Please sign in to comment.