{

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs";
  };

  outputs =
    { nixpkgs, ... }:
    let
      pkgs = import nixpkgs { system = "x86_64-linux"; };
    in
    rec {
      devShells.default = pkgs.mkShell {
        nativeBuildInputs = [ pkgs.bashInteractive ];
        buildInputs = with pkgs; [
          quarto
          texliveFull
        ];
      };

      packages.x86_64-linux = {
        default = pkgs.callPackage (
          {
            stdenv,
            quarto,
            which,
            ...
          }:

          stdenv.mkDerivation {
            name = "coap-february-2025";
            src = ./.;

            buildInputs = [
              quarto
              which
            ];

            buildPhase = ''
              mkdir _slides           
              HOME=. quarto render index.qmd --output-dir _slides 
            '';

            installPhase = ''
              cp -r _slides  $out
              rm $out/index.qmd
              rm $out/*.nix
            '';
          }
        ) { };
      };

      checks.default = {
        inherit packages;
      };
    };
}
