Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

101 lines
2.1 KiB
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
yarnConfigHook,
npmHooks,
nodejs-slim,
fetchYarnDeps,
flavour ? [ "mocha" ],
accents ? [ "blue" ],
}:
let
validFlavours = [
"mocha"
"macchiato"
"frappe"
"latte"
];
validAccents = [
"rosewater"
"flamingo"
"pink"
"mauve"
"red"
"maroon"
"peach"
"yellow"
"green"
"teal"
"sky"
"sapphire"
"blue"
"lavender"
];
in
lib.checkListOfEnum "Invalid accent, valid accents are ${toString validAccents}" validAccents
accents
lib.checkListOfEnum
"Invalid flavour, valid flavours are ${toString validFlavours}"
validFlavours
flavour
stdenvNoCC.mkDerivation
(finalAttrs: {
pname = "catppuccin-discord";
version = "0-unstable-2024-12-08";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "16b1e5156583ee376ded4fa602842fa540826bbc";
hash = "sha256-ECVHRuHbe3dvwrOsi6JAllJ37xb18HaUPxXoysyPP70=";
};
nativeBuildInputs = [
yarnConfigHook
npmHooks.npmInstallHook
nodejs-slim
];
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-2N4UI6Ap+zk7jtDCAsjGtwfDSiyOtB9YDOXUxYRCw60=";
};
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
yarn --offline release
runHook postBuild
'';
# "true" disables the dist phase, as there are no binaries and installation of themes
# will be handled in installPhase below.
distPhase = "true";
installPhase = ''
runHook preInstall
mkdir -p $out/share
for FLAVOUR in ${toString flavour}; do
for ACCENT in ${toString accents}; do
cp -va dist/dist/catppuccin-"$FLAVOUR"-"$ACCENT".theme.css $out/share
done;
done;
runHook postInstall
'';
meta = {
description = "Soothing pastel theme for Discord";
homepage = "https://github.com/catppuccin/discord";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ NotAShelf ];
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
};
})