From bd8e2231bc534c355dbcdcada8ba04f6801a37ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 18 Dec 2022 09:56:50 -0300 Subject: [PATCH] fluent-gtk-theme: init at 2022-12-15 --- pkgs/data/themes/fluent-gtk-theme/default.nix | 76 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 78 insertions(+) create mode 100644 pkgs/data/themes/fluent-gtk-theme/default.nix diff --git a/pkgs/data/themes/fluent-gtk-theme/default.nix b/pkgs/data/themes/fluent-gtk-theme/default.nix new file mode 100644 index 000000000000..3359e6e1b128 --- /dev/null +++ b/pkgs/data/themes/fluent-gtk-theme/default.nix @@ -0,0 +1,76 @@ +{ 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 rec { + inherit pname; + version = "2022-12-15"; + + src = fetchFromGitHub { + owner = "vinceliuice"; + repo = pname; + rev = version; + hash = "sha256-lGT6MIpc7cdAznZlbSJJ7aBzZPHucyfR8ZNMdJI0LP8="; + }; + + 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} \ + --dest $out/share/themes + + jdupes --quiet --link-soft --recurse $out/share + + runHook postInstall + ''; + + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + description = "Fluent design gtk theme"; + homepage = "https://github.com/vinceliuice/Fluent-gtk-theme"; + license = licenses.gpl3Only; + platforms = platforms.unix; + maintainers = [ maintainers.romildo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ccdec4f5573..701c28fe6211 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26556,6 +26556,8 @@ with pkgs; flat-remix-gtk = callPackage ../data/themes/flat-remix-gtk { }; flat-remix-gnome = callPackage ../data/themes/flat-remix-gnome { }; + fluent-gtk-theme = callPackage ../data/themes/fluent-gtk-theme { }; + fluent-icon-theme = callPackage ../data/icons/fluent-icon-theme { }; font-awesome_4 = (callPackage ../data/fonts/font-awesome { }).v4;