Skip to content

Commit 71d3441

Browse files
committed
Fix nixos module output
1 parent 3487d48 commit 71d3441

File tree

5 files changed

+210
-207
lines changed

5 files changed

+210
-207
lines changed

flake.nix

+8-44
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,17 @@
1212
# TODO enable kupo supported OS's
1313
systems = [ "x86_64-linux" ];
1414
ciSystems = systems;
15-
hs-kupo = { lib, pkgs, inputs, ... }: lib.iogx.mkHaskellProject {
16-
cabalProject = pkgs.haskell-nix.cabalProject'
17-
{
18-
src = pkgs.haskell-nix.haskellLib.cleanSourceWith {
19-
name = "kupo-src";
20-
src = inputs.kupo;
21-
filter = path: type:
22-
builtins.all (x: x) [
23-
(baseNameOf path != "package.yaml")
24-
];
25-
};
26-
# `compiler-nix-name` upgrade policy: as soon as inputs.kupo
27-
compiler-nix-name = lib.mkDefault "ghc96";
28-
inputMap = {
29-
"https://input-output-hk.github.io/cardano-haskell-packages" = inputs.iogx.inputs.CHaP;
30-
};
31-
sha256map = {
32-
"https://github.com/CardanoSolutions/ogmios"."01f7787216e7ceb8e39c8c6807f7ae53fc14ab9e" = "1TU3IYTzm7h/wpt/fkHbaR0esVhyHKNtdCJpjsferZo=";
33-
"https://github.com/CardanoSolutions/direct-sqlite"."82c5ab46715ecd51901256144f1411b480e2cb8b" = "fuKhPnIVsmdbQ2gPBTzp9nI/3/BTsnvNIDa1Ypw1L+Q=";
34-
"https://github.com/CardanoSolutions/text-ansi"."e204822d2f343b2d393170a2ec46ee935571345c" = "e6EINXr5Tfx5vzSY+wmGt/7seIdkM1WM7Tvy4zQ/cZo=";
35-
};
36-
modules = [
37-
{
38-
# FIXME kupo unit tests are not passing
39-
packages.kupo.components.tests.unit.doCheck = false;
40-
}
41-
];
42-
};
43-
};
44-
nixos-kupo = { pkgs, lib, ... }: {
45-
flake.nixosModules.kupo = {
46-
imports = [ ./kupo-nixos-module.nix ];
47-
services.kupo.package = lib.mkOptionDefault pkgs.kupo;
48-
};
49-
};
15+
nixos = import ./nixos.nix inputs self;
5016
in
5117
inputs.iogx.lib.mkFlake {
5218
inherit inputs systems;
53-
outputs = c@{ system, ... }: [
54-
(hs-kupo c)
55-
(nixos-kupo c)
56-
{
57-
packages.default = self.packages.${system}.kupo;
58-
}
59-
];
60-
flake.herculesCI = {
61-
inherit ciSystems;
19+
repoRoot = ./.;
20+
outputs = import ./nix/outputs.nix;
21+
flake = {
22+
inherit (nixos) nixosModules;
23+
herculesCI = {
24+
inherit ciSystems;
25+
};
6226
};
6327
};
6428

kupo-nixos-module.nix

-163
This file was deleted.

nix/outputs.nix

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{ repoRoot, ... }: [
2+
repoRoot.nix.project.flake
3+
]

nix/project.nix

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{ lib, pkgs, inputs, ... }: lib.iogx.mkHaskellProject {
2+
cabalProject = pkgs.haskell-nix.cabalProject'
3+
{
4+
src = pkgs.haskell-nix.haskellLib.cleanSourceWith {
5+
name = "kupo-src";
6+
src = inputs.kupo;
7+
filter = path: type:
8+
builtins.all (x: x) [
9+
(baseNameOf path != "package.yaml")
10+
];
11+
};
12+
# `compiler-nix-name` upgrade policy: as soon as inputs.kupo
13+
compiler-nix-name = lib.mkDefault "ghc96";
14+
inputMap = {
15+
"https://input-output-hk.github.io/cardano-haskell-packages" = inputs.iogx.inputs.CHaP;
16+
};
17+
sha256map = {
18+
"https://github.com/CardanoSolutions/ogmios"."01f7787216e7ceb8e39c8c6807f7ae53fc14ab9e" = "1TU3IYTzm7h/wpt/fkHbaR0esVhyHKNtdCJpjsferZo=";
19+
"https://github.com/CardanoSolutions/direct-sqlite"."82c5ab46715ecd51901256144f1411b480e2cb8b" = "fuKhPnIVsmdbQ2gPBTzp9nI/3/BTsnvNIDa1Ypw1L+Q=";
20+
"https://github.com/CardanoSolutions/text-ansi"."e204822d2f343b2d393170a2ec46ee935571345c" = "e6EINXr5Tfx5vzSY+wmGt/7seIdkM1WM7Tvy4zQ/cZo=";
21+
};
22+
modules = [
23+
{
24+
# FIXME kupo unit tests are not passing
25+
packages.kupo.components.tests.unit.doCheck = false;
26+
}
27+
];
28+
};
29+
}

0 commit comments

Comments
 (0)