1
0
Fork 0

add codeberg-themes to forgejo

This commit is contained in:
Philipp 2025-05-12 19:28:47 +02:00
parent b938a41bee
commit aff4e4599d
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
5 changed files with 120 additions and 27 deletions

View file

@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitea,
}:
stdenv.mkDerivation rec {
pname = "codeberg-themes";
version = "1.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Codeberg-Infrastructure";
repo = "forgejo";
rev = "codeberg-11";
sha256 = "sha256-iPPj7Hz+Jp+lnAa0N5rjSIXWYiTvjPQ8pMQB3SetdYA=";
};
unpackPhase = ''
# We clone the repo and only extract the folder we need
mkdir -p $out
cp -r $src/web_src/css/themes $out/themes
'';
installPhase = ''
# Create the required directories for installation
mkdir -p $out/var/lib/forgejo/custom/public/assets/css
mkdir -p $out/var/lib/forgejo/custom/public/assets/img
# Move theme files
cp -r $out/themes/* $out/var/lib/forgejo/custom/public/assets/css/
# Install logo
cp ${./logo.svg} $out/var/lib/forgejo/custom/public/assets/img/
'';
meta = with lib; {
description = "Codeberg themes and logo for Forgejo";
maintainers = with maintainers; [ spaenny ];
};
}