summaryrefslogtreecommitdiff
path: root/flake.nix
blob: fa86e719165796018cf7d2b5aff4931b8c1357e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  description = "Assets for my webpages";
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
    nix-filter.url = "github:numtide/nix-filter";
  };

  outputs = { self, nixpkgs, flake-utils, nix-filter, ... }: {
    overlays.default = import ./nix/overlay.nix { inherit nix-filter; };
  } // flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
        overlays = [ self.overlays.default ];
      };
    in {
      packages = {
        inherit (pkgs) www-assets;
        default = pkgs.www-assets;
      };

      devShells.default = pkgs.haskellPackages.shellFor {
        packages = p: [ p.www-assets ];
        withHoogle = true;
        buildInputs = with pkgs.haskellPackages; [
          cabal-install
          hpack
        ];
      };
    });
}