-
Notifications
You must be signed in to change notification settings - Fork 39
/
flake.nix
59 lines (57 loc) · 2.53 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
{
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
systems.url = "github:nix-systems/default-linux";
yafas = {
url = "https://flakehub.com/f/UbiqueLambda/yafas/0.1.*.tar.gz";
inputs.systems.follows = "systems";
};
};
outputs = { self, nixpkgs, yafas, ... }: yafas.withAllSystems nixpkgs
(_: { pkgs, system }: with pkgs; rec {
packages =
let
pkgsARM32 = pkgsCross.armv7l-hf-multiplatform;
pkgs32 = if system == "x86_64-linux" then pkgsi686Linux else pkgsARM32;
mkCTR = withDebug: withMods: {
native32 = with pkgs32; {
gcc = callPackage ./rebuild_PC { ctrModSDK = self; inherit withDebug withMods; };
clang = callPackage ./rebuild_PC { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug withMods; };
};
mingw32 = with pkgsCross.mingw32; {
gcc = callPackage ./rebuild_PC { ctrModSDK = self; inherit withDebug withMods; };
clang = callPackage ./rebuild_PC { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug withMods; };
};
};
mkOnline = withDebug: {
native32 = with pkgs32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
arm32 = with pkgsARM32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
mingw32 = with pkgsCross.mingw32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug; };
};
};
in
rec {
retail = {
release = mkCTR false false;
debug = mkCTR true false;
};
decomp = {
release = mkCTR false true;
debug = mkCTR true true;
};
online-server = {
release = mkOnline false;
debug = mkOnline true;
};
};
})
{ };
}