2021-04-22 02:08:21 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, gnome-themes-extra
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, sassc
|
2021-12-19 01:06:50 +00:00
|
|
|
, tweaks ? [ ] # can be "solid" "compact" "black" "primary"
|
2021-04-22 02:08:21 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
let
|
|
|
|
validTweaks = [ "solid" "compact" "black" "primary" ];
|
|
|
|
unknownTweaks = lib.subtractLists validTweaks tweaks;
|
|
|
|
in
|
|
|
|
assert lib.assertMsg (unknownTweaks == [ ]) ''
|
|
|
|
You entered wrong tweaks: ${toString unknownTweaks}
|
|
|
|
Valid tweaks are: ${toString validTweaks}
|
|
|
|
'';
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation
|
|
|
|
rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "orchis-theme";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "2021-12-13";
|
2021-02-22 21:28:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "Orchis-theme";
|
|
|
|
owner = "vinceliuice";
|
|
|
|
rev = version;
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-PN2ucGMDzRv4v86X1zVIs9+GkbMWuja2WaSQLFvJYd0=";
|
2021-02-22 21:28:39 +00:00
|
|
|
};
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
nativeBuildInputs = [ gtk3 sassc ];
|
2021-02-22 21:28:39 +00:00
|
|
|
|
|
|
|
buildInputs = [ gnome-themes-extra ];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/share/themes
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2021-12-19 01:06:50 +00:00
|
|
|
bash install.sh -d $out/share/themes -t all ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks}
|
2021-02-22 21:28:39 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|