From edab40d27f5af3d8d48ad8f87343332563d71ea9 Mon Sep 17 00:00:00 2001 From: dr56ekgbb Date: Thu, 3 Oct 2024 21:50:39 +0800 Subject: [PATCH] marble-shell-theme: init at 46.2.3 --- .../by-name/ma/marble-shell-theme/package.nix | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/ma/marble-shell-theme/package.nix diff --git a/pkgs/by-name/ma/marble-shell-theme/package.nix b/pkgs/by-name/ma/marble-shell-theme/package.nix new file mode 100644 index 000000000000..35374f8c1ee3 --- /dev/null +++ b/pkgs/by-name/ma/marble-shell-theme/package.nix @@ -0,0 +1,48 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + python3, + colors ? [ "all" ], # Default to install all available colors + additionalInstallationTweaks ? [ ], # Additional installation tweaks +}: +assert lib.assertMsg (colors != [ ]) "The `colors` list can not be empty"; +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "marble-shell-theme"; + version = "46.2.3"; + + src = fetchFromGitHub { + owner = "imarkoff"; + repo = "Marble-shell-theme"; + rev = "5971b15d8115c60c3a16b1d219ecffd2cfcdb323"; + hash = "sha256-TX6BSS29EAi2PjL1fMvEKD12RjB9xrfqPSQsJJrUcJg="; + }; + + nativeBuildInputs = [ python3 ]; + + patchPhase = '' + runHook prePatch + substituteInPlace scripts/config.py \ + --replace-fail "~/.themes" ".themes" + runHook postPatch + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/themes + python install.py ${ + lib.escapeShellArgs (map (color: "--${color}") colors) + } ${lib.escapeShellArgs additionalInstallationTweaks} + cp -r .themes/* $out/share/themes/ + runHook postInstall + ''; + + meta = { + description = "Shell theme for GNOME DE"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + homepage = "https://github.com/imarkoff/Marble-shell-theme"; + changelog = "https://github.com/imarkoff/Marble-shell-theme/releases/tag/${finalAttrs.version}"; + maintainers = with lib.maintainers; [ aucub ]; + }; +})