nix/lib/templates/godot/flake.nix

43 lines
886 B
Nix
Raw Permalink Normal View History

{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2025-02-14 13:31:18 -06:00
outputs =
{
self,
nixpkgs,
...
}:
let
inherit (self) outputs;
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
2024-03-19 10:25:29 -05:00
2025-02-14 13:31:18 -06:00
"x86_64-darwin"
"aarch64-darwin"
];
2025-02-14 13:31:18 -06:00
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = outputs.devShells.${system}.godot;
godot = pkgs.mkShell {
buildInputs = with pkgs; [
godot_4
gdtoolkit
];
shellHook = ''
echo -e "\e[0;30m\e[43m Use 'godot4 -e' to run the editor for this project. \e[0;30m\e[0m"
'';
};
}
);
};
}