nixpkgs/pkgs/data/themes/orchis-theme/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.7 KiB
Nix
Raw Normal View History

2021-04-21 17:37:27 +02:00
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, gnome-themes-extra
, gtk-engine-murrine
, sassc
, border-radius ? null # Suggested: 2 < value < 16
, tweaks ? [ ] # can be "solid" "compact" "black" "primary"
, withWallpapers ? false
2021-04-21 17:37:27 +02: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 {
pname = "orchis-theme";
version = "2022-10-19";
2021-01-30 21:20:34 +01:00
src = fetchFromGitHub {
repo = "Orchis-theme";
owner = "vinceliuice";
rev = version;
sha256 = "sha256-1lJUrWkb8IoUyCMn8J4Lwvs/pWsibrY0pSXrepuQcug=";
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
bash install.sh -d $out/share/themes -t all \
${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
${lib.optionalString (!isNull border-radius) ("--round " + builtins.toString border-radius + "px")}
${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 ];
};
}