packages feed

hinit-0.2.1: data/templates/haskell/flake.nix

{
  inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
  inputs.flake-utils.url = github:poscat0x04/flake-utils;

  outputs = { self, nixpkgs, flake-utils, ... }: with flake-utils;
    eachDefaultSystem (
      system:
        let
          pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
        in
          with pkgs;
          {
            devShell = {{ project }}-dev.envFunc { withHoogle = true; };
            defaultPackage = {{ project }};
          }
    ) // {
      overlay = self: super:
        let
          hpkgs = super.haskellPackages;
          {{ project }} = hpkgs.callCabal2nix "{{ project }}" ./. {};
        in
          with super; with haskell.lib;
          {
            inherit {{ project }};
            {{ project }}-dev = addBuildTools {{ project }} [
              haskell-language-server
              cabal-install
            ];
          };
    };
}