2021-04-21 17:37:27 +02:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, gnome-themes-extra
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, sassc
|
2022-09-28 19:48:56 +02:00
|
|
|
, border-radius ? null # Suggested: 2 < value < 16
|
2023-01-14 18:24:41 +01:00
|
|
|
, tweaks ? [ ] # can be "solid" "compact" "black" "primary" "macos" "submenu" "nord|dracula"
|
2022-01-20 17:53:04 +01:00
|
|
|
, withWallpapers ? false
|
2021-04-21 17:37:27 +02:00
|
|
|
}:
|
|
|
|
|
2021-10-17 14:42:16 +02:00
|
|
|
let
|
2023-01-14 18:24:41 +01:00
|
|
|
pname = "orchis-theme";
|
|
|
|
|
|
|
|
validTweaks = [ "solid" "compact" "black" "primary" "macos" "submenu" "nord" "dracula" ];
|
|
|
|
|
|
|
|
nordXorDracula = with builtins; lib.assertMsg (!(elem "nord" tweaks) || !(elem "dracula" tweaks)) ''
|
|
|
|
${pname}: dracula and nord cannot be mixed. Tweaks ${toString tweaks}
|
|
|
|
'';
|
2021-10-17 14:42:16 +02:00
|
|
|
in
|
2023-01-14 18:24:41 +01:00
|
|
|
|
|
|
|
assert nordXorDracula;
|
|
|
|
lib.checkListOfEnum "${pname}: theme tweaks" validTweaks tweaks
|
2021-10-17 14:42:16 +02:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation
|
|
|
|
rec {
|
2023-01-14 18:24:41 +01:00
|
|
|
inherit pname;
|
2023-05-01 17:26:13 +02:00
|
|
|
version = "2023-04-08";
|
2021-01-30 21:20:34 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "Orchis-theme";
|
|
|
|
owner = "vinceliuice";
|
|
|
|
rev = version;
|
2023-05-01 17:26:13 +02:00
|
|
|
hash = "sha256-/X4Hr2M/7pf6JxTUvPoG5VkQd+rweEPeTNe9glSLh78=";
|
2021-01-30 21:20:34 +01:00
|
|
|
};
|
|
|
|
|
2021-04-21 17:37:27 +02:00
|
|
|
nativeBuildInputs = [ gtk3 sassc ];
|
2021-01-30 21:20:34 +01:00
|
|
|
|
|
|
|
buildInputs = [ gnome-themes-extra ];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/share/themes
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2022-09-28 19:48:56 +02:00
|
|
|
bash install.sh -d $out/share/themes -t all \
|
|
|
|
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
|
2023-03-05 22:08:45 +01:00
|
|
|
${lib.optionalString (border-radius != null) ("--round " + builtins.toString border-radius + "px")}
|
2022-01-20 17:53:04 +01:00
|
|
|
${lib.optionalString withWallpapers ''
|
|
|
|
mkdir -p $out/share/backgrounds
|
|
|
|
cp src/wallpaper/{1080p,2k,4k}.jpg $out/share/backgrounds
|
|
|
|
''}
|
2021-01-30 21:20:34 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Material Design theme for GNOME/GTK based desktop environments.";
|
|
|
|
homepage = "https://github.com/vinceliuice/Orchis-theme";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.fufexan ];
|
|
|
|
};
|
|
|
|
}
|