-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (62 loc) · 1.74 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
mars = {
url = "github:reflex-frp/reflex-platform/mars_obelisk";
flake = false;
};
};
outputs = inputs: let
lib = import "${inputs.nixpkgs}/lib";
pkgs'' = inputs.nixpkgs.legacyPackages.x86_64-linux;
supportedSystems = lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
];
in rec {
hydraJobs = rec {
recurseForDerivations = true;
build = supportedSystems (system: packages."${system}".earth);
projects = supportedSystems (system: packages."${system}".proj);
devShells = pkgs''.releaseTools.aggregate
{ name = "earth-devshells";
constituents = [ projects.x86_64-linux.shells.ghc ];
meta.description = "Earth DevShells";
};
release = pkgs''.releaseTools.aggregate
{ name = "earth";
constituents = [ build.x86_64-linux ];
meta.description = "Earth build";
};
};
packages = supportedSystems (system: let
marsProject = import inputs.mars {
inherit system;
};
proj = marsProject ({ pkgs, ... }: {
name = "earth";
src = ./.;
compiler-nix-name = "ghc926";
overrides = [
({ config, lib, pkgs, ... }: {
packages.earth.components.library.build-tools = [
pkgs.nix
pkgs.openssh
];
})
];
shellTools = {
cabal = "3.6.2.0";
};
shells = ps: with ps; [
earth
];
});
in {
earth = proj.hsPkgs.earth.components.exes.earth;
inherit proj;
});
devShell = supportedSystems (system: packages.${system}.proj.shells.ghc);
};
}