-
Notifications
You must be signed in to change notification settings - Fork 61
/
flake.nix
50 lines (42 loc) · 1.49 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
{
description = "Flake providing a package for the Space Station 14 Launcher.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
inputs.flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
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/package.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);
};
}