haccfiles/pkgs/haccvoc-stage/default.nix
stuebinm 163229b057
haccvoc: stage website
this is a possibly horrible idea, but I used nix to generate a jekyll
config for a jekyll generating a website which can display videos, so if
we want we can now set the whole website up by adjusting some Nix config
things (okay, I'll admit that mostly I wasn't in the mood for gitlab pages …)

Anyways, features of the web site:
 - shows videos (using videojs, loaded locally)
 - has a chat iframe
 - has a dark mode, displays hint if javascript is disabled (on how to
   watch the stream outside a browser / how to join the chat), the WAVE
   checker doesn't complain too much about it
 - looks somewhat reasonable on all sizes my laptop's screen can display
   (and hopefully elsewhere, too)
 - very, very bad default texts so hopefully we won't forget to change any
 - literally nothing else, not even a font
2021-08-26 22:36:45 +02:00

32 lines
588 B
Nix

{ config ? {baseurl = "";}
, pkgs ? import <nixpkgs> {}
, ... }:
with pkgs;
stdenv.mkDerivation {
name = "voc-stage-site";
src = ./site;
phases = [ "configPhase" "buildPhase" "installPhase" ];
configPhase = ''
cp $src/* -r .
rm -f _config.yml
# let's just hope we'll never run into that one edge case
# where json actually isn't valid yaml?
echo ${lib.escapeShellArg (builtins.toJSON config)} > _config.yml
'';
buildPhase = ''
rm env-vars
${jekyll}/bin/jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r _site/* $out
'';
}