add codeberg-themes to forgejo
This commit is contained in:
parent
b938a41bee
commit
aff4e4599d
5 changed files with 120 additions and 27 deletions
40
packages/codeberg-themes/default.nix
Normal file
40
packages/codeberg-themes/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue