forked from Revolutionary-Games/Thrive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
48 lines (46 loc) · 1.64 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
{
description = "Nix Flake for Thrive Development";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
# PR for godot4-mono 4.2.1 https://github.com/NixOS/nixpkgs/pull/285941
# TODO: switch to master once merged
nixpkgs-godot.url = "github:ilikefrogs101/nixpkgs/Godot-4.2.2";
};
outputs = { self, nixpkgs, nixpkgs-godot, ... }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
nixpkgs-godotFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
# Launch into the shell environment with `nix develop`
# Building and running is possible by following setup_instructions.md
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
pkgs-godot = nixpkgs-godotFor.${system};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
# Git lfs needs to be enabled in .config
git
git-lfs
dotnet-sdk_8
((pkgs-godot.callPackage "${nixpkgs-godot}/pkgs/development/tools/godot/4/mono" { }).override { withTouch = false; })
# For compiling native libraries
cmake
clang_14
lld_17
# For packaging manually
zip
p7zip
# For Localization
poedit
gettext
];
};
});
};
}