{
  description = "An flake to provide dev and build environnement for presenterm post production";

  inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";

  outputs = inputs: {
    devShells = forEachSupportedSystem ( { pkgs }: {
        default = pkgs.mkShell {
          packages = with pkgs; [
            presenterm
            python313Packages.weasyprint
          ];
        };
      } );

    packages = forEachSupportedSystem ( { pkgs }: {
        default = pkgs.stdenv.mkDerivation {
          inherit (pkgs) system;
          name = "linkedin-shoblog-posts";
          src = ./src;
          buildInputs = with pkgs; [
            presenterm
            python313Packages.weasyprint
          ];
          buildPhase =
            let
              font_dir = pkgs.nerd-fonts.jetbrains-mono;
              config = pkgs.writeTextFile {
                name = "presenterm.conf";
                text = ''
                  # presenterm configuration
                '';
              };
            in
            ''
              export PRES_CONFIG=${config}
              python scripts/build.py
            '';
        };
      } );
  };
}
