switch to ics files; make calendars work; fix some minor issues

This commit is contained in:
XenGi 2026-08-12 02:01:58 +02:00
commit c28f04c6e8
Signed by: xengi
SSH key fingerprint: SHA256:jxWM2RTHvxxcncXycwwWkP7HCWb4VREN05UGJTbIPZg
19 changed files with 318 additions and 259 deletions

View file

@ -2,7 +2,7 @@
description = "A flake containing a development environment for the CCCB website.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
};
outputs =
@ -34,7 +34,7 @@
devShells = forAllSystems (import ./devShells.nix);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree);
lib.mkWwwContent =
{ domain, system }:
@ -50,10 +50,6 @@
nativeBuildInputs = [
pkgs.hugo
pkgs.glibcLocales
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.icalendar
python-pkgs.pytz
]))
];
# LOCALE_ARCHIVE = builtins.trace pkgs.glibcLocales "${pkgs.glibcLocales}/lib/locale/locale-archive";
@ -62,11 +58,6 @@
buildPhase = ''
mkdir -p public
hugo --baseURL=https://${domain}/
python3 ./tools/merge_cals.py
upcoming="$(python3 tools/gen_upcoming.py static/all.ics 20 5 | tr '\n' ' ')"
cp static/all.ics public/all.ics
sed -i "s#CALENDAR#$upcoming#g" public/index.html
'';
# Install phase - copy the public directory to the output