forked from MaddTheSane/executor
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathflake.nix
52 lines (50 loc) · 2.07 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
{
description = "Executor 2000 - classic mac emulator";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; };
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems =
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
packages.default = pkgs.stdenv.mkDerivation {
name = "executor2000";
nativeBuildInputs = with pkgs; [
cmake
bison
perl
ruby
pkg-config
qt6.wrapQtAppsHook
];
buildInputs =
let
patchedWaylandPP = pkgs.waylandpp.overrideAttrs (oldAttrs: {
postPatch = ''
# update wayland.xml and xdg-shell.xml to the versions used by the wayland and wayland-protocols packages
tar --wildcards -O -xf ${pkgs.buildPackages.wayland.src} 'wayland*/protocol/wayland.xml' > protocols/wayland.xml
cp -r ${pkgs.wayland-protocols}/share/wayland-protocols/stable/xdg-shell/*.xml protocols/extra/
'';
});
in
with pkgs;
[ qt6.qtbase boost readline SDL2 ]
++ lib.optionals stdenv.isLinux [ SDL wayland patchedWaylandPP ]
++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ Carbon Cocoa ]);
src = ./.;
hardeningDisable = [ "all" ];
cmakeFlags = [ "-DRUN_FIXUP_BUNDLE=NO" "-DNO_STATIC_BOOST=YES" ];
};
packages.headless = pkgs.stdenv.mkDerivation {
name = "executor2000";
nativeBuildInputs = with pkgs; [ cmake bison perl ruby pkg-config ];
buildInputs = with pkgs;
[ boost readline ] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ Carbon Cocoa ]);
src = ./.;
cmakeFlags = [ "-DFRONT_ENDS=headless" "-DNO_STATIC_BOOST=YES" ];
hardeningDisable = [ "all" ];
};
};
};
}