Skip to content

Commit

Permalink
Merge pull request #296682 from ElysaSrc/master
Browse files Browse the repository at this point in the history
catppuccin-sddm: init at 1.0.0
  • Loading branch information
Aleksanaa authored May 12, 2024
2 parents 9a65c15 + 16fd1c8 commit 48695bb
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5919,6 +5919,12 @@
githubId = 1365692;
name = "Will Fancher";
};
elysasrc = {
name = "Elysa";
github = "ElysaSrc";
githubId = 101974839;
email = "[email protected]";
};
emantor = {
email = "[email protected]";
github = "Emantor";
Expand Down
80 changes: 80 additions & 0 deletions pkgs/by-name/ca/catppuccin-sddm/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
just,
kdePackages,
flavor ? "mocha",
font ? "Noto Sans",
fontSize ? "9",
background ? null,
loginBackground ? false,
}:
stdenvNoCC.mkDerivation rec {
pname = "catppuccin-sddm";
version = "1.0.0";

src = fetchFromGitHub {
owner = "catppuccin";
repo = "sddm";
rev = "v${version}";
hash = "sha256-SdpkuonPLgCgajW99AzJaR8uvdCPi4MdIxS5eB+Q9WQ=";
};

dontWrapQtApps = true;

nativeBuildInputs = [
just
];

propagatedBuildInputs = [
kdePackages.qtsvg
];

buildPhase = ''
runHook preBuild
just build
runHook postBuild
'';

installPhase = ''
runHook preInstall
mkdir -p "$out/share/sddm/themes/"
cp -r dist/catppuccin-${flavor} "$out/share/sddm/themes/catppuccin-${flavor}"
configFile=$out/share/sddm/themes/catppuccin-${flavor}/theme.conf
substituteInPlace $configFile \
--replace-fail 'Font="Noto Sans"' 'Font="${font}"' \
--replace-fail 'FontSize=9' 'FontSize=${fontSize}'
${lib.optionalString (background != null) ''
substituteInPlace $configFile \
--replace-fail 'Background="backgrounds/wall.jpg"' 'Background="${background}"' \
--replace-fail 'CustomBackground="false"' 'CustomBackground="true"'
''}
${lib.optionalString loginBackground ''
substituteInPlace $configFile \
--replace-fail 'LoginBackground="false"' 'LoginBackground="true"'
''}
runHook postInstall
'';

postFixup = ''
mkdir -p $out/nix-support
echo ${kdePackages.qtsvg} >> $out/nix-support/propagated-user-env-packages
'';

meta = {
description = "Soothing pastel theme for SDDM";
homepage = "https://github.com/catppuccin/sddm";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [elysasrc];
platforms = lib.platforms.linux;
};
}

0 comments on commit 48695bb

Please sign in to comment.