-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
49 lines (44 loc) · 1.5 KB
/
flake.nix
File metadata and controls
49 lines (44 loc) · 1.5 KB
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
{
description = "Numcraft - Numtide's Minecraft server";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.clan-core.url = "git+https://git.clan.lol/clan/clan-core";
inputs.clan-core.inputs.nixpkgs.follows = "nixpkgs";
outputs =
{
self,
nixpkgs,
flake-parts,
clan-core,
}:
let
inherit (nixpkgs) lib;
forAllSystems =
f: lib.genAttrs lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (pkgs: rec {
slack-bridge = pkgs.callPackage ./slack-bridge/package.nix { };
client = pkgs.callPackage ./client/package.nix { };
mrpack = pkgs.callPackage ./mrpack/package.nix { };
default = client;
});
overlays.default = final: prev: {
numcraft-client = final.callPackage ./client/package.nix { };
numcraft-slack-bridge = final.callPackage ./slack-bridge/package.nix { };
};
checks = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
nixosLib = import (nixpkgs + "/nixos/lib") { };
in
lib.optionalAttrs pkgs.stdenv.isLinux {
server-start = import ./checks/server-start {
inherit pkgs nixosLib clan-core self;
};
}
);
flakeModules.default = flake-parts.lib.importApply ./flake-module.nix { inherit self; };
};
}