1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

feat: add glamour

This commit is contained in:
Ryan Cao 2023-09-09 21:48:00 +08:00
parent 9b029be624
commit fd3b5d5a41
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
6 changed files with 73 additions and 12 deletions

49
overlays/ctp-glamour.nix Normal file
View file

@ -0,0 +1,49 @@
(_: prev: let
flavors = [
{
flavor = "latte";
sha256 = "sha256-V0LsRStF1vL+Tz8G6VaKiwiY/ZIsSkMc+f1WJAITYXU=";
}
{
flavor = "frappe";
sha256 = "sha256-YOatgYCJKuesVERHZVmF1xtzuLjyxCYstoWYqATq+NU=";
}
{
flavor = "macchiato";
sha256 = "sha256-CeSJvhjzHVTtlqgQLKOrdLXtp2OQlMh24IaA1QQiQCk=";
}
{
flavor = "mocha";
sha256 = "sha256-Tx2fQteL4wxhV+qHYZibakiYoEhS4HjyMO0yBcU/F6Q=";
}
];
in {
ctp-glamour = builtins.listToAttrs (builtins.map ({
flavor,
sha256,
}: {
name = flavor;
value = prev.callPackage (
{
stdenvNoCC,
lib,
fetchurl,
}:
stdenvNoCC.mkDerivation rec {
name = "ctp-glamour-${flavor}";
version = "1.0.0";
src = fetchurl {
url = "https://github.com/catppuccin/glamour/releases/download/v${version}/${flavor}.json";
inherit sha256;
};
unpackPhase = ''
mkdir -p $out
cp $src $out/default.json
'';
}
) {};
})
flavors);
})

View file

@ -1,4 +1,5 @@
{
ibm-plex = import ./ibm-plex.nix;
ryan-mono-bin = import ./ryan-mono-bin.nix;
ctp-glamour = import ./ctp-glamour.nix;
}