{
  description = "A very basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: let
    lib = nixpkgs.lib;
  in {

    packages = lib.attrsets.genAttrs lib.systems.flakeExposed (system: let
      pkgs = import nixpkgs { inherit system; };
      src = lib.cleanSource ./.;
    in {
      default = pkgs.runCommand "build-website" {} ''
        mkdir $out
        cp -r ${src}/* $out
        cd $out
        ${pkgs.pandoc}/bin/pandoc --standalone \
          --from commonmark_x+alerts \
          --output=index.html \
          --template=pandoc/template.html4 \
          --css=style.css \
          --toc \
          --toc-depth=1 \
          --resource-path=. \
          --lua-filter=pandoc/paper.lua \
          --lua-filter=pandoc/date.lua \
          index.md
      '';
    });
  };
}
