forked from FreesmTeam/FreesmLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
96 lines (82 loc) · 2.4 KB
/
flake.nix
File metadata and controls
96 lines (82 loc) · 2.4 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
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
96
{
description = "Prism Launcher fork aimed to provide a free way to play Minecraft.";
nixConfig = {
substituters = [
"https://cache.nixos.org"
"https://cache.garnix.io"
"https://freesmlauncher.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"freesmlauncher.cachix.org-1:Jcp5Q9wiLL+EDv8Mh7c6L9xGk+lXr7/otpKxMOuBuDs="
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-filter.url = "github:numtide/nix-filter";
libnbtplusplus = {
url = "github:FreesmTeam/libnbtplusplus";
flake = false;
};
};
outputs = {
self,
nixpkgs,
nix-filter,
libnbtplusplus,
...
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSystem = nixpkgs.lib.genAttrs systems;
in {
overlays.default = final: prev: {
freesmlauncher-unwrapped = final.callPackage ./nix/unwrapped.nix {
inherit nix-filter libnbtplusplus self;
};
freesmlauncher = final.callPackage ./nix/wrapper.nix;
};
packages = forEachSystem (system: let
pkgs = import nixpkgs {inherit system;};
freesmlauncher-unwrapped = pkgs.callPackage ./nix/unwrapped.nix {
inherit nix-filter libnbtplusplus self;
};
freesmlauncher = pkgs.callPackage ./nix/wrapper.nix {
inherit freesmlauncher-unwrapped;
};
freesmlauncher-unwrapped-debug = freesmlauncher-unwrapped.overrideAttrs {
cmakeBuildType = "Debug";
dontStrip = true;
};
freesmlauncher-debug = pkgs.callPackage ./nix/wrapper.nix {
freesmlauncher-unwrapped = freesmlauncher-unwrapped-debug;
};
in {
inherit freesmlauncher freesmlauncher-unwrapped freesmlauncher-debug freesmlauncher-unwrapped-debug;
default = freesmlauncher;
});
devShells = forEachSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [self.overlays.default];
};
in {
default = pkgs.mkShell {
inputsFrom = [pkgs.freesmlauncher-unwrapped];
packages = with pkgs; [
ccache
ninja
];
};
});
formatter = forEachSystem (
system:
(import nixpkgs {inherit system;}).alejandra
);
};
}