.
This commit is contained in:
parent
e01ffa4cec
commit
becdaee408
8 changed files with 276 additions and 18 deletions
70
packages/everforrest-gtk/default.nix
Normal file
70
packages/everforrest-gtk/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
gtk-engine-murrine,
|
||||
jdupes,
|
||||
sassc,
|
||||
accent ? ["default"],
|
||||
shade ? "dark",
|
||||
size ? "standard",
|
||||
}: let
|
||||
validAccents = ["default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey"];
|
||||
validShades = ["light" "dark"];
|
||||
validSizes = ["standard" "compact"];
|
||||
|
||||
single = x: lib.optional (x != null) x;
|
||||
pname = "Everforrest";
|
||||
in
|
||||
lib.checkListOfEnum "${pname} Valid theme accent(s)" validAccents accent
|
||||
lib.checkListOfEnum "${pname} Valid shades" validShades (single shade)
|
||||
lib.checkListOfEnum "${pname} Valid sizes" validSizes (single size)
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "${pname}";
|
||||
version = "0-unstable-2024-06-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Fausto-Korpsvart";
|
||||
repo = "Everforrest-GTK-Theme";
|
||||
rev = "bb3fc27a2468f0965a738d9d3b30c52a799572d2";
|
||||
# hash = "sha256-oKqLb66N4swHfhjUZJIGryE0D9MkuLdKFQa6j3TFmOg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [jdupes sassc];
|
||||
|
||||
propagatedUserEnvPkgs = [gtk-engine-murrine];
|
||||
|
||||
postPatch = ''
|
||||
find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
|
||||
patchShebangs "$file"
|
||||
done
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/themes
|
||||
|
||||
./themes/install.sh \
|
||||
--name ${pname} \
|
||||
${toString (map (x: "--theme " + x) accent)} \
|
||||
${lib.optionalString (shade != null) ("--color " + shade)} \
|
||||
${lib.optionalString (size != null) ("--size " + size)} \
|
||||
--dest $out/share/themes
|
||||
|
||||
jdupes --quiet --link-soft --recurse $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A GTK theme based on the Everforrest colour palette";
|
||||
homepage = "https://github.com/Fausto-Korpsvart/Everforrest-GTK-Theme";
|
||||
license = licenses.gpl3Only;
|
||||
# maintainers = with maintainers; [ icy-thought ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue