Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godot: add mono support #88006

wants to merge 1 commit into
base: master

godot: add mono support #88006

wants to merge 1 commit into from


Copy link

lihop commented May 17, 2020

Following the guide

Motivation for this change

The Godot game engine supports scripting with the C# programming language. However, in order to so it must be compiled with mono support. This pull request adds such an option to the Nixpkgs derivation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits

I am successfully using this derivation to build and run godot mono projects on NixOS. But I am still experiencing some weirdness around NuGet.

When building, Godot tries to fetch some NuGet packages, but of course in Nix it isn't allowed to download sources from the internet in the build phase, so we have to download and the sources prior to this phase which I do in these lines.

After install however, when I run nuget-restore in my Godot project, after adding a PackageReference to my *.csproj file, NuGet seems to ignore my users NuGet.conf and still looks for sources in nixos. I can workaround this by creating a directory called nixos in my godot project root directory and installing my C# dependencies there.

As I am new to C# and the NuGet package manager, I haven't got around to solving this yet, and am still using the workaround, but this should be fixed before merging in to Nixpkgs.

@lihop lihop force-pushed the lihop:godot-mono branch from 8e180de to d90e353 May 17, 2020
@lihop lihop mentioned this pull request May 17, 2020
@yegortimoshenko yegortimoshenko self-assigned this Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.