forked from space-wizards/SS14.Launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (45 loc) · 1.48 KB
/
flake.nix
File metadata and controls
52 lines (45 loc) · 1.48 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
{
description = "Flake providing a package for the Space Station 14 Launcher.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs =
{ self, nixpkgs, ... }:
let
forAllSystems =
function:
nixpkgs.lib.genAttrs [ "x86_64-linux" ] # TODO: aarch64-linux support
(system: function system (import nixpkgs { inherit system; }));
in
{
packages = forAllSystems (
system: pkgs: {
default = self.packages.${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.stdenv.hostPlatform.system}.space-station-14-launcher;
};
};
apps = forAllSystems (
system: pkgs:
let
pkg = self.packages.${system}.space-station-14-launcher;
in
{
default = self.apps.${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.${system}.space-station-14-launcher.passthru.fetch-deps;
};
}
);
formatter = forAllSystems (_: pkgs: pkgs.nixpkgs-fmt);
};
}