{
  inputs = {
    nixpkgs = {
      url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    };
    utils.url = "github:numtide/flake-utils";
  };

  outputs =
    inputs:
    inputs.utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import inputs.nixpkgs {
          localSystem = system;
          overlays = [
            (final: prev: {
              bluespec-docs = prev.callPackage (
                {
                  stdenv,
                  zola,
                  git,
                }:
                stdenv.mkDerivation ({
                  pname = "bluespec-docs";
                  version = "0.1.0";
                  src = inputs.self;

                  nativeBuildInputs = [
                    zola
                    git
                  ];
                  buildPhase = ''
                    zola build
                  '';

                  installPhase = ''
                    mkdir -p $out
                    cp -r public $out
                  '';
                })
              ) { };
            })
          ];
        };
      in
      {
        packages = {
          default = inputs.self.packages."${system}".bluespec-docs;
          bluespec-docs = pkgs.bluespec-docs;
        };

        devShells.default =
          with pkgs;
          mkShell {
            inputsFrom = [ bluespec-docs ];
          };
      }
    );
}
