diff options
| author | D3vil0p3r <vozaanthony@gmail.com> | 2024-07-15 19:32:08 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2024-07-24 15:15:30 +0000 |
| commit | 5bca104b7acf7e5e854de8057bd1efc9c6469d12 (patch) | |
| tree | 5d5e8a89e2fdf7b6e27e41aa445e1a13849aed88 | |
| parent | Merge pull request #329548 from mweinelt/24.05/firefox-128.0.2 (diff) | |
| download | nixpkgs-origin/backport-327431-to-release-24.05.tar.gz | |
matrix-gtk-theme: init at 0-unstable-2024-07-22origin/backport-327431-to-release-24.05
(cherry picked from commit 0d1c5ff307c29d06a0ca06b8b5e66b2fb4c5353e)
| -rw-r--r-- | pkgs/by-name/ma/matrix-gtk-theme/package.nix | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/pkgs/by-name/ma/matrix-gtk-theme/package.nix b/pkgs/by-name/ma/matrix-gtk-theme/package.nix new file mode 100644 index 000000000000..77283781bcaa --- /dev/null +++ b/pkgs/by-name/ma/matrix-gtk-theme/package.nix @@ -0,0 +1,123 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + gnome, + sassc, + gnome-themes-extra, + gtk-engine-murrine, + unstableGitUpdater, + colorVariants ? [ ], + sizeVariants ? [ ], + themeVariants ? [ ], + tweakVariants ? [ ], + iconVariants ? [ ], +}: + +let + pname = "matrix-gtk-theme"; + colorVariantList = [ + "dark" + "light" + ]; + sizeVariantList = [ + "compact" + "standard" + ]; + themeVariantList = [ + "default" + "green" + "grey" + "orange" + "pink" + "purple" + "red" + "teal" + "yellow" + "all" + ]; + tweakVariantList = [ + "neo" + "trinity" + "black" + "float" + "outline" + "macos" + ]; + iconVariantList = [ + "Dark" + "Light" + "Sweet" + ]; +in +lib.checkListOfEnum "${pname}: colorVariants" colorVariantList colorVariants lib.checkListOfEnum + "${pname}: sizeVariants" + sizeVariantList + sizeVariants + lib.checkListOfEnum + "${pname}: themeVariants" + themeVariantList + themeVariants + lib.checkListOfEnum + "${pname}: tweakVariants" + tweakVariantList + tweakVariants + lib.checkListOfEnum + "${pname}: iconVariants" + iconVariantList + iconVariants + + stdenvNoCC.mkDerivation + { + inherit pname; + version = "0-unstable-2024-07-22"; + + src = fetchFromGitHub { + owner = "D3vil0p3r"; + repo = "Matrix-GTK-Theme"; + rev = "f453093dffa0f46596b325c6a760afd6ea6cd810"; + hash = "sha256-DfM4nsJZvcNyUUn0opu3OM46sxhsjeeyuUuliQPrU0I="; + }; + + propagatedUserEnvPkgs = [ gtk-engine-murrine ]; + + nativeBuildInputs = [ + gnome.gnome-shell + sassc + ]; + buildInputs = [ gnome-themes-extra ]; + + dontBuild = true; + + passthru.updateScript = unstableGitUpdater { }; + + postPatch = '' + patchShebangs themes/install.sh + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/themes + cd themes + ./install.sh -n Matrix \ + ${lib.optionalString (colorVariants != [ ]) "-c " + toString colorVariants} \ + ${lib.optionalString (sizeVariants != [ ]) "-s " + toString sizeVariants} \ + ${lib.optionalString (themeVariants != [ ]) "-t " + toString themeVariants} \ + ${lib.optionalString (tweakVariants != [ ]) "--tweaks " + toString tweakVariants} \ + -d "$out/share/themes" + cd ../icons + ${lib.optionalString (iconVariants != [ ]) '' + mkdir -p $out/share/icons + cp -a ${toString (map (v: "Matrix-${v}") iconVariants)} $out/share/icons/ + ''} + runHook postInstall + ''; + + meta = { + description = "GTK theme based on the Matrix colour palette"; + homepage = "https://github.com/D3vil0p3r/Matrix-GTK-Theme"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ d3vil0p3r ]; + platforms = lib.platforms.unix; + }; + } |
