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

  outputs = { self, nixpkgs, ... }@inputs:
    inputs.flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };
        hlib = pkgs.haskell.lib.compose;
        hpkgs = pkgs.haskell.packages.ghc98.extend (final: prev: {
          `template:project-name` =
            hlib.dontCheck
              (final.callCabal2nix "`template:project-name`" ./. {});
        });
      in {
        packages = rec {
          `template:project-name` = hpkgs.`template:project-name`;
          default = `template:project-name`;
        };

        devShells.default = hpkgs.shellFor {
          packages = p: [
            p.`template:project-name`
          ];
          nativeBuildInputs = [
            hpkgs.cabal-fmt
            hpkgs.fourmolu
            hpkgs.haskell-language-server
            hpkgs.cabal-install
          ];
          withHoogle = true;
        };
      });
}
