This repository has no description
938 B
32 lines
1{ ... }:
2{
3 perSystem =
4 { pkgs, ... }:
5 let
6 python = pkgs.python3.withPackages (ps: [
7 ps.icalendar
8 ps.jinja2
9 ps.recurring-ical-events
10 ]);
11 # The VGA font of https://lassul.us, so the booking page matches it.
12 static = pkgs.runCommand "book-static" { } ''
13 cp -r ${./static} $out
14 chmod u+w $out
15 cp ${../../configs/websites/lassul.us/Web437_IBM_VGA_8x16.woff} $out/font.woff
16 '';
17 in
18 {
19 # Request-and-approve booking page backed by CalDAV (book.lassul.us,
20 # configs/book.nix).
21 packages.book =
22 (pkgs.writeShellApplication {
23 name = "book";
24 text = ''
25 export BOOK_TEMPLATES=${./templates}
26 export BOOK_STATIC=${static}
27 exec ${python}/bin/python3 ${./book.py} "$@"
28 '';
29 }).overrideAttrs
30 { passthru.usage = builtins.readFile ./usage.kdl; };
31 };
32}