forked from mbrlabs/Lorien
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
73 lines (64 loc) · 1.71 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
62
63
64
65
66
67
68
69
70
71
72
73
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
version = "4.3";
godot-stable = pkgs.fetchurl {
url = "https://github.com/godotengine/godot/releases/download/${version}-stable/Godot_v${version}-stable_linux.x86_64.zip";
hash = "sha256-feVkRLEwsQr4TRnH4M9jz56ZN+5LqUNkw7fdEUJTyiE=";
};
buildInputs = with pkgs; [
alsa-lib
dbus
fontconfig
libGL
libpulseaudio
libxkbcommon
makeWrapper
mesa
patchelf
speechd
udev
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
];
godot-unwrapped = pkgs.stdenv.mkDerivation {
pname = "godot";
version = "4.3";
src = godot-stable;
nativeBuildInputs = with pkgs; [unzip autoPatchelfHook];
buildInputs = buildInputs;
dontAutoPatchelf = false;
unpackPhase = ''
mkdir source
unzip $src -d source
'';
installPhase = ''
mkdir -p $out/bin
cp source/Godot_v${version}-stable_linux.x86_64 $out/bin/godot
'';
};
godot-bin = pkgs.buildFHSUserEnv {
name = "godot";
targetPkgs = pkgs: buildInputs ++ [godot-unwrapped];
runScript = "godot";
};
in {
devShell = pkgs.mkShell {
buildInputs = [godot-bin];
};
});
}