about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <malaquias@gmail.com>2024-06-13 07:16:25 -0300
committerGitHub <noreply@github.com>2024-06-13 07:16:25 -0300
commitec1d2210eaffafeed098405a8576f760ca306265 (patch)
treedc0ab58dc9c41bb45cf00a82f8482bae5a0296b3 /pkgs/by-name
parent149a5595745219bbe84801635c371f32cf32c2a3 (diff)
parent6959071f7c372e7e8fb2ce1cb9da139b45f24750 (diff)
Merge pull request #319509 from luftmensch-luftmensch/fluent-gtk-theme_2024-06-12
fluent-gtk-theme: 2024-04-28 -> 2024-06-12
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/fl/fluent-gtk-theme/package.nix114
1 files changed, 114 insertions, 0 deletions
diff --git a/pkgs/by-name/fl/fluent-gtk-theme/package.nix b/pkgs/by-name/fl/fluent-gtk-theme/package.nix
new file mode 100644
index 0000000000000..137f8a92dd1bc
--- /dev/null
+++ b/pkgs/by-name/fl/fluent-gtk-theme/package.nix
@@ -0,0 +1,114 @@
+{
+  lib,
+  stdenvNoCC,
+  fetchFromGitHub,
+  gitUpdater,
+  gnome-themes-extra,
+  gtk-engine-murrine,
+  jdupes,
+  sassc,
+  themeVariants ? [ ], # default: blue
+  colorVariants ? [ ], # default: all
+  sizeVariants ? [ ], # default: standard
+  tweaks ? [ ],
+}:
+
+let
+  pname = "fluent-gtk-theme";
+in
+lib.checkListOfEnum "${pname}: theme variants"
+  [
+    "default"
+    "purple"
+    "pink"
+    "red"
+    "orange"
+    "yellow"
+    "green"
+    "teal"
+    "grey"
+    "all"
+  ]
+  themeVariants
+  lib.checkListOfEnum
+  "${pname}: color variants"
+  [
+    "standard"
+    "light"
+    "dark"
+  ]
+  colorVariants
+  lib.checkListOfEnum
+  "${pname}: size variants"
+  [
+    "standard"
+    "compact"
+  ]
+  sizeVariants
+  lib.checkListOfEnum
+  "${pname}: tweaks"
+  [
+    "solid"
+    "float"
+    "round"
+    "blur"
+    "noborder"
+    "square"
+  ]
+  tweaks
+
+  stdenvNoCC.mkDerivation
+  (finalAttrs: {
+    inherit pname;
+    version = "2024-06-12";
+
+    src = fetchFromGitHub {
+      owner = "vinceliuice";
+      repo = "fluent-gtk-theme";
+      rev = finalAttrs.version;
+      hash = "sha256-ONhW68UUrFiv5hxkR7XI8U/5+qM+tYLIS2OM05pqJi0=";
+    };
+
+    nativeBuildInputs = [
+      jdupes
+      sassc
+    ];
+
+    buildInputs = [ gnome-themes-extra ];
+
+    propagatedUserEnvPkgs = [ gtk-engine-murrine ];
+
+    postPatch = ''
+      patchShebangs install.sh
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      name= HOME="$TMPDIR" ./install.sh \
+        ${lib.optionalString (themeVariants != [ ]) "--theme " + builtins.toString themeVariants} \
+        ${lib.optionalString (colorVariants != [ ]) "--color " + builtins.toString colorVariants} \
+        ${lib.optionalString (sizeVariants != [ ]) "--size " + builtins.toString sizeVariants} \
+        ${lib.optionalString (tweaks != [ ]) "--tweaks " + builtins.toString tweaks} \
+        --icon nixos \
+        --dest $out/share/themes
+
+      jdupes --quiet --link-soft --recurse $out/share
+
+      runHook postInstall
+    '';
+
+    passthru.updateScript = gitUpdater { };
+
+    meta = {
+      description = "Fluent design gtk theme";
+      changelog = "https://github.com/vinceliuice/Fluent-gtk-theme/releases/tag/${finalAttrs.version}";
+      homepage = "https://github.com/vinceliuice/Fluent-gtk-theme";
+      license = lib.licenses.gpl3Only;
+      platforms = lib.platforms.unix;
+      maintainers = with lib.maintainers; [
+        luftmensch-luftmensch
+        romildo
+      ];
+    };
+  })