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

Update and introduce Godot and godot_headers #34971

Merged
merged 13 commits into from Mar 27, 2018
Merged

Update and introduce Godot and godot_headers #34971

merged 13 commits into from Mar 27, 2018

Conversation

Twey
Copy link
Contributor

@Twey Twey commented Feb 14, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "godot_headers";
version = "51bca3bf5d917341f3e15076c5a9191f8a5118ae";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a valid version string; see e.g. parseDrvName. It's common to use the rev date for unreleased versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@Twey Twey force-pushed the master branch 2 times, most recently from fdfa101 to 87f80e2 Compare February 20, 2018 12:17
@Twey
Copy link
Contributor Author

Twey commented Feb 20, 2018

I'm not sure why pkg-config requires libpthreadstubs here on non-NixOS builds but not NixOS builds, but this seems to be the case.

EDIT: figured out; fixed.

@Twey
Copy link
Contributor Author

Twey commented Feb 23, 2018

Bump! I build this a lot — would be nice to have it cached.

@joachifm
Copy link
Contributor

@GrahamcOfBorg build godot godot_headers

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘godot-3.0’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/tools/godot/default.nix:49 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

scons: *** [thirdparty/thekla_atlas/nvmesh/param/SingleFaceMap.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/nvmesh/param/AtlasPacker.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/nvmesh/weld/VertexWeld.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/nvmesh/param/Util.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/nvmesh/weld/Snap.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/nvmesh/param/AtlasBuilder.x11.tools.64.o] Error 1
scons: *** [thirdparty/thekla_atlas/thekla/thekla_atlas.x11.tools.64.o] Error 1
scons: building terminated because of errors.
builder for '/nix/store/gy7y6bmdhsz6nmfvsjsa6g4kgg7bsbbr-godot-3.0.drv' failed with exit code 2
�[31;1merror:�[0m build of '/nix/store/gy7y6bmdhsz6nmfvsjsa6g4kgg7bsbbr-godot-3.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0
shrinking /nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0/bin/godot
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0/bin 
patching script interpreter paths in /nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0
checking for references to /tmp/nix-build-godot-3.0.drv-0 in /nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0...
/nix/store/ggnlh061ikdr36xh5ay1ak7yrnkzix0v-godot-3.0
/nix/store/j0lzvrk0yysazx8kdraxyrf1zrm5gwa1-godot_headers

@Twey
Copy link
Contributor Author

Twey commented Feb 23, 2018

It might be supported on Darwin, but I haven't been able to test.

@Twey
Copy link
Contributor Author

Twey commented Mar 1, 2018

Is something wrong with this PR?

@Ekleog
Copy link
Member

Ekleog commented Mar 14, 2018

@Twey Currently the PR can't be merged, most likely due to 1bc1909. You should rebase your changes over this commit, I think :)

Also, ofborg reported a failure on aarch64-linux. Unfortunately full logs have since been deleted (they're deleted 7 days after build completion), so there's no easy way to know what exactly went wrong.

So, as I guess upstream godot has no support of aarch64 (from https://godot.readthedocs.io/en/latest/development/compiling/introduction_to_the_buildsystem.html#bits), so after having checked godot 2.1.4 didn't build on aarch64 either you could just change the meta.platforms value to reflect the “no aarch64” requirement.

@Twey
Copy link
Contributor Author

Twey commented Mar 16, 2018

Thanks a lot! How's this? :)

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: godot_headers

The following builds were skipped because they don't evaluate on aarch64-linux: godot

Partial log (click to expand)

/nix/store/9lamqwqzs005fhxm0pyvl21ri3jaqmg8-godot_headers

@Ekleog
Copy link
Member

Ekleog commented Mar 18, 2018

@Twey Guess you'll have to update your patches, likely due to the switch to 3.0.2 ;)

@Twey
Copy link
Contributor Author

Twey commented Mar 19, 2018

I was pretty tired when I pushed that commit…
Should be working now; at least it works locally!

@Ekleog
Copy link
Member

Ekleog commented Mar 19, 2018

Thanks!

Just two little things before retriggering a rebuild:

  1. I think you can remove lines 6-7 and replace the + at the beginning of lines 13-14 with spaces, this should make the patch easier to read :) (not really important though)
  2. More importantly, the package currently requires gcc5 for building, which means additional load on ofborg (as indicated by the now-deleted comment of ofborg that pointed to a timeout during the build of gcc5). As AUR's package for godot appears not to force gcc5, do you know whether this package would also build with the default gcc? :)

@Twey
Copy link
Contributor Author

Twey commented Mar 19, 2018

I'm not sure — I was modifying the old one, so I made minimal changes. I'll give it a test.

@Twey
Copy link
Contributor Author

Twey commented Mar 19, 2018

Seems it works!

@Ekleog
Copy link
Member

Ekleog commented Mar 19, 2018

@GrahamcOfBorg build godot godot_headers

@Twey
Copy link
Contributor Author

Twey commented Mar 20, 2018

Is this a success output?

@Ekleog
Copy link
Member

Ekleog commented Mar 20, 2018

Turns out I didn't have access to ofborg yet, so when NixOS/ofborg#140 is deployed I'll be able to trigger the build, sorry!

@Ekleog
Copy link
Member

Ekleog commented Mar 20, 2018

@GrahamcOfBorg build godot godot_headers
(can't beat that speed)

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: godot_headers

The following builds were skipped because they don't evaluate on aarch64-linux: godot

Partial log (click to expand)

configuring
no configure script, doing nothing
building
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9lamqwqzs005fhxm0pyvl21ri3jaqmg8-godot_headers
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/9lamqwqzs005fhxm0pyvl21ri3jaqmg8-godot_headers
checking for references to /build in /nix/store/9lamqwqzs005fhxm0pyvl21ri3jaqmg8-godot_headers...
/nix/store/9lamqwqzs005fhxm0pyvl21ri3jaqmg8-godot_headers

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: godot, godot_headers

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2
shrinking /nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2/bin/godot
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2/bin
patching script interpreter paths in /nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2
checking for references to /tmp/nix-build-godot-3.0.2.drv-0 in /nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2...
/nix/store/190xsjpb4nzk758dl383538c6xw9ydwp-godot-3.0.2
/nix/store/hwfl7jr5pw5l4fq76lk8k2nd7z7pjybd-godot_headers

@Ekleog
Copy link
Member

Ekleog commented Mar 20, 2018

I think this is good to merge, modulo x86_64 for which I'm not accredited to trigger builds, due to the lack of sandboxing :)

cc @joachifm, as you had started reviewing it a few weeks ago :)

This was referenced Mar 25, 2018
@Twey
Copy link
Contributor Author

Twey commented Mar 26, 2018

There are three different pull requests for this now… is there some reason they're not being merged?

@srhb
Copy link
Contributor

srhb commented Mar 27, 2018

OK, I tested execution of the binary and it looks sane on all accounts to me. I don't know much else about Godot, but I see no glaring issues here, so here goes.

@srhb srhb merged commit 048724c into NixOS:master Mar 27, 2018
@NilsIrl
Copy link
Member

NilsIrl commented Aug 8, 2019

@Twey what's the point of pkgs/development/tools/godot/dont_clobber_environment.patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants