-
Notifications
You must be signed in to change notification settings - Fork 8
/
flake.nix
61 lines (58 loc) · 1.83 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
60
61
{
description = "First person clone of Super Mario Bros.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
# my personal nix-bundle branch
# can be switched to the main repo when PR #76 is merged
nix-bundle.url = "github:radvendii/nix-bundle";
};
outputs = { self, nixpkgs, flake-utils, nix-bundle }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages."${system}";
oldGlibcPkgs = import nixpkgs {
inherit system;
overlays = [
nix-bundle.overlays.glibc_2_24
];
};
in rec {
defaultPackage = packages.game;
packages = {
game = import ./nix { inherit nixpkgs system; };
darwin-app = import ./darwin-app.nix { inherit nixpkgs system; };
windows = import ./windows.nix { inherit nixpkgs system; };
flatpak = import ./flatpak.nix { inherit nixpkgs system; };
appimage = nix-bundle.bundlers.appimage {
inherit system;
target = (oldGlibcPkgs.callPackage ./package.nix { }).overrideAttrs (old: {
mesonFlags = [ "-Dportable=true" ];
});
# trial and error removing them from the AppDir
excludePkgs = with oldGlibcPkgs;
[ llvm_11
mesa
glibc
glibcInfo
glibcLocales
systemd
systemdMinimal
glib
ncurses
xorg.xkeyboardconfig
util-linuxMinimal
bashInteractive
kbd
shadow
];
};
};
defaultApp = {
type = "app";
program = "${packages.game}/bin/MAR1D";
};
}
);
}