Newer
Older
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
65
66
67
68
69
70
71
72
73
74
75
76
{
description = "Horizon Haskell: Moon Base";
inputs = {
get-flake.url = "github:ursi/get-flake";
horizon-shell-flake = {
url = "git+https://gitlab.horizon-haskell.net/shells/horizon-shell";
flake = false;
};
horizon-platform.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-platform";
lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs@
{ self
, flake-utils
, get-flake
, horizon-shell-flake
, horizon-platform
, lint-utils
, nixpkgs
, ...
}:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
in
with pkgs.lib;
let
horizon-shell = get-flake horizon-shell-flake;
overrides = composeManyExtensions [
(import ./overlay.nix { inherit pkgs; })
];
legacyPackages = horizon-platform.legacyPackages.${system}.override {
inherit overrides;
};
packages = filterAttrs
(n: v: v != null
&& builtins.typeOf v == "set"
&& pkgs.lib.hasAttr "type" v
&& v.type == "derivation"
&& v.meta.broken == false)
legacyPackages;
devShell = pkgs.mkShell {
buildInputs = [
horizon-shell.packages.${system}.default
];
shellHook = ''
horizon-shell
exit
'';
};
in
{
checks = with lint-utils.outputs.linters.${system}; {
dhall-format = dhall-format { src = self; };
nixpkgs-fmt = nixpkgs-fmt { src = self; };
};
devShells.default = devShell;
inherit legacyPackages;
inherit overrides;
inherit packages;
});
}