about summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-07-05 01:16:41 +0200
committerGitHub <noreply@github.com>2023-07-05 01:16:41 +0200
commit2995f57b67369b12c2fb35c0268f513a941896b1 (patch)
tree330cd881d355eb48a15ff4fceb1f7ab0adc16be4 /pkgs/data
parent1ae1914f0c0ea2c3e98e404ba5125f0fddee381f (diff)
parentab01576cb1570db4b971f87bddb13d9c93f8b4bb (diff)
Merge pull request #224352 from sents/chili-sddm-theme
Add Chili sddm theme
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/themes/chili-sddm/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/data/themes/chili-sddm/default.nix b/pkgs/data/themes/chili-sddm/default.nix
new file mode 100644
index 0000000000000..a1b26248b8dba
--- /dev/null
+++ b/pkgs/data/themes/chili-sddm/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, qtgraphicaleffects
+, themeConfig ? { }
+}:
+let
+  customToString = x: if builtins.isBool x then lib.boolToString x else toString x;
+  configLines = lib.mapAttrsToList (name: value: lib.nameValuePair name value) themeConfig;
+  configureTheme = "cp theme.conf theme.conf.orig \n" +
+    (lib.concatMapStringsSep "\n"
+      (configLine:
+        "grep -q '^${configLine.name}=' theme.conf || echo '${configLine.name}=' >> \"$1\"\n" +
+          "sed -i -e 's/^${configLine.name}=.*$/${configLine.name}=${
+        lib.escape [ "/" "&" "\\"] (customToString configLine.value)
+      }/' theme.conf"
+      )
+      configLines);
+in
+stdenv.mkDerivation {
+  pname = "sddm-chili-theme";
+  version = "0.1.5";
+
+  src = fetchFromGitHub {
+    owner = "MarianArlt";
+    repo = "sddm-chili";
+    rev = "6516d50176c3b34df29003726ef9708813d06271";
+    sha256 = "036fxsa7m8ymmp3p40z671z163y6fcsa9a641lrxdrw225ssq5f3";
+  };
+
+  propagatedBuildInputs = [
+    qtgraphicaleffects
+  ];
+
+  dontWrapQtApps = true;
+
+  preInstall = configureTheme;
+
+  postInstall = ''
+    mkdir -p $out/share/sddm/themes/chili
+
+    mv * $out/share/sddm/themes/chili/
+  '';
+
+  postFixup = ''
+    mkdir -p $out/nix-support
+
+    echo ${qtgraphicaleffects} >> $out/nix-support/propagated-user-env-packages
+  '';
+  meta = with lib; {
+    license = licenses.gpl3;
+    maintainers = with lib.maintainers; [ sents ];
+    homepage = "https://github.com/MarianArlt/sddm-chili";
+    description = "The chili login theme for SDDM";
+    longDescription = ''
+      Chili is hot, just like a real chili!
+      Spice up the login experience for your users, your family and yourself.
+      Chili reduces all the clutter and leaves you with a clean, easy to use, login interface with a modern yet classy touch.
+    '';
+  };
+}