-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
95 lines (91 loc) · 2.54 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
mcmeta-summary = {
url = "github:misode/mcmeta/summary";
flake = false;
};
};
outputs =
inputs@{
self,
nixpkgs,
flake-utils,
mcmeta-summary,
}:
{
overlays.default =
final: prev:
let
builder = final.callPackage (import ./nix/builder.nix) {
minecraftVersionsSummary = builtins.fromJSON (
builtins.readFile "${mcmeta-summary}/versions/data.json"
);
};
in
{
inherit (builder) buildDataPack joinDataPacks build-and-copy;
};
templates = {
default = {
description = "Single data pack in the root of the repository";
path = ./nix/templates/default;
};
monorepo = {
description = "Multiple data packs in subdirectories";
path = ./nix/templates/monorepo;
};
};
}
// (flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system}.extend self.overlays.default;
in
rec {
formatter = pkgs.nixfmt-rfc-style;
devShells.default = pkgs.mkShell {
packages = [
pkgs.nixd
pkgs.deno
pkgs.zip
pkgs.unzip
pkgs.fish
pkgs.build-and-copy
formatter
];
};
apps = rec {
default = build-and-copy;
build-and-copy = {
type = "app";
program = "${pkgs.build-and-copy}/bin/build-and-copy";
};
};
packages = rec {
afk = pkgs.callPackage ./afk { };
afk-sleep = pkgs.callPackage ./afk-sleep { };
afk-message = pkgs.callPackage ./afk-message { };
afk-dim-names = pkgs.callPackage ./afk-dim-names { };
afk-kick = pkgs.callPackage ./afk-kick { };
afk-immunity = pkgs.callPackage ./afk-immunity { };
pause-day-cycle = pkgs.callPackage ./pause-day-cycle { };
chickenfix = pkgs.callPackage ./chickenfix { };
no-free-deaths = pkgs.callPackage ./no-free-deaths { };
all = pkgs.joinDataPacks "clo4-datapacks" [
afk
afk-sleep
afk-message
afk-dim-names
afk-kick
afk-immunity
pause-day-cycle
chickenfix
no-free-deaths
];
default = all;
};
}
));
}