forked from Visne/SS14.Launcher
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
45 lines (38 loc) · 1.4 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
{
description = "Flake providing a package for the Space Station 14 Launcher.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
outputs = { self, nixpkgs }:
let
forAllSystems = function:
nixpkgs.lib.genAttrs [ "x86_64-linux" ] # TODO: aarch64-linux support
(system: function (import nixpkgs { inherit system; }));
in
{
packages = forAllSystems (pkgs: {
default = self.packages.${pkgs.system}.space-station-14-launcher;
space-station-14-launcher =
pkgs.callPackage ./nix/wrapper.nix { };
});
overlays = {
default = self.overlays.space-station-14-launcher;
space-station-14-launcher = final: prev: {
space-station-14-launcher =
self.packages.${prev.system}.space-station-14-launcher;
};
};
apps = forAllSystems (pkgs:
let pkg = self.packages.${pkgs.system}.space-station-14-launcher; in {
default = self.apps.${pkgs.system}.space-station-14-launcher;
space-station-14-launcher = {
type = "app";
program = "${pkg}/bin/${pkg.meta.mainProgram}";
};
fetch-deps = {
type = "app";
program = toString
self.packages.${pkgs.system}.space-station-14-launcher.passthru.fetch-deps;
};
});
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
};
}