Jump to content

Godot: Difference between revisions

From Official NixOS Wiki
Apia (talk | contribs)
fixed export template instructions; the process was changed in https://github.com/NixOS/nixpkgs/commit/03756b98364a8e8c4319d1a5b163d25a5b297fe5, i think, maybe theres an easier way to do this, but i dont know enough about nix to say
Apia (talk | contribs)
m fix typo
 
Line 12: Line 12:
On Godot upgrade, the new export template can be automatically provisioned this way:
On Godot upgrade, the new export template can be automatically provisioned this way:


<code>hhome.file.".local/share/godot/export_templates".source = "${pkgs.godot_4-export-templates-bin}/share/godot/export_templates";</code>
<code>home.file.".local/share/godot/export_templates".source = "${pkgs.godot_4-export-templates-bin}/share/godot/export_templates";</code>


=== Android Export Target ===
=== Android Export Target ===

Latest revision as of 12:15, 16 June 2026

☶︎
This article or section needs to be expanded. Further information may be found in the related discussion page. Please consult the pedia article metapage for guidelines on contributing.

Godot is an open-source game engine, capable of creating both 2D and 3D games.

Installation

Add pkgs.godot (GDScript only) to environment.systemPackages.

For installing Godot-Mono (C#), see Godot-Mono article.

Export Templates

On Godot upgrade, the new export template can be automatically provisioned this way:

home.file.".local/share/godot/export_templates".source = "${pkgs.godot_4-export-templates-bin}/share/godot/export_templates";

Android Export Target

Accept Android license:

nixpkgs.config.android_sdk.accept_license = true;

Add to your system the usual Android and Java development packages, such as:

environment.systemPackages = with pkgs; [
  android-studio
  android-tools
  androidenv.androidPkgs.androidsdk
  androidenv.androidPkgs.emulator
  androidenv.androidPkgs.ndk-bundle
  jdk # Java
];

Configure Godot's Editor -> Editor Settings -> General [Tab] -> Export [Category] -> Android [Sub-item], as such:

  • Android SDK Path: Reference pkgs.androidenv.androidPkgs.androidsdk path. Like: /nix/store/p2cdj75bbzswjc84789cmlwhy6ll7avr-androidsdk/libexec/android-sdk/
  • Java SDK Path: Reference pkgs.jdk path. Like: /nix/store/55qm2mvhmv7n2n6yzym1idrvnlwia73z-openjdk-21.0.5+11

Running Exported Application in NixOS

Use steam-run to run a Godot exported project without having to fix paths for Nix.