-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
67 lines (63 loc) · 1.83 KB
/
flake.nix
File metadata and controls
67 lines (63 loc) · 1.83 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
{
description = "Sandopolis: Sega Genesis, Master System, Game Gear, and SG-1000 emulator development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
linuxRuntimeLibs = with pkgs; [
alsa-lib
libpulseaudio
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXext
xorg.libXrandr
];
in
{
default = pkgs.mkShell {
packages = with pkgs;
[
zig
gnumake
cmake
git
pre-commit
pkg-config
clang-tools
gdb
]
++ pkgs.lib.optionals pkgs.stdenv.isLinux linuxRuntimeLibs;
shellHook =
pkgs.lib.optionalString pkgs.stdenv.isLinux ''
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath linuxRuntimeLibs}:''${LD_LIBRARY_PATH:-}"
''
+ ''
echo "Sandopolis dev shell"
echo "Common commands:"
echo " make build"
echo " make test"
echo " make help"
echo " BUILD_TYPE=ReleaseFast make run ARGS=\"'tests/testroms/titan-overdrive2.bin'\""
'';
};
}
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
};
}