-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
60 lines (58 loc) · 1.89 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
{
inputs = {
godot.url = "github:godotengine/godot";
godot.flake = false;
};
outputs = {self, nixpkgs, ...}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs{inherit system;};
in
rec{
packages."${system}" = with pkgs; {
default = stdenv.mkDerivation rec{
name = "godot";
src = inputs.godot;
nativeBuildInputs = [
scons
pkg-config
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
xorg.libXi
xorg.libXext
xorg.libXfixes
udev
systemd
systemd.dev
libpulseaudio
freetype
openssl
alsa-lib
libGLU
zlib
yasm
autoPatchelfHook
];
runtimeDependencies = [vulkan-loader libpulseaudio];
patchPhase = ''
substituteInPlace platform/linuxbsd/detect.py --replace 'pkg-config xi ' 'pkg-config xi xfixes '
'';
enableParallelBuilding = true;
buildInputs = nativeBuildInputs;
sconsFlags = "platform=linuxbsd";
installPhase = ''
mkdir -p "$out/bin"
cp bin/godot.* $out/bin/godot
'';
};
};
devShells."${system}".head = with pkgs; mkShell{
nativeBuildInputs = [patchelf nodePackages.http-server];
runtimeDependencies = nativeBuildInputs;
};
};
}