-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
36 lines (32 loc) · 1.06 KB
/
flake.nix
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
32
33
34
35
36
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
haskellNix.url = "github:input-output-hk/haskell.nix/master";
};
outputs = { self, nixpkgs, haskellNix }:
let
supportedSystems = [ "x86_64-linux" ];
# Function to generate a set based on supported systems
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems (system: f system);
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [ haskellNix.overlay ];
});
in {
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
project = (import ./default.nix { inherit pkgs; });
blog4 = project.blog4;
in {
plan-nix = project.plan-nix;
materialize = project.updateMaterialized;
blog4 = blog4.components.exes.blog4;
});
defaultPackage = forAllSystems (system: self.packages.${system}.blog4);
devShell = forAllSystems (system: import ./shell.nix {
pkgs = nixpkgsFor.${system};
});
};
}