-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
xonotic: fix a couple of bugs #90019
Conversation
- Build all three binaries (sdl, glx, server) - build player UID infrastructure - locate and add more libraries looked up at runtime: - fix font (uses the xonolonium font now) (libfreetype) - add libtheora/enc/dev libvorbis/enc/file - copy public key over to installation directory, so player UIDs work this looks to me now like a mostly functioning version of xonotic. The build is linux specific though
I don't see the reason to revert to one package, instead of the 3, which saves a lot of hydra storage. CC @petabyteboy |
My aim here was to get a working xonotic package for myself. I originally had a comment in the PR stating that I do not expect this to be merged in this form - it somehow got lost during my fumbling with PR (I don't do that too often ;)). But maybe the maintainers of the original package can take inspiration from the changes and use it to fix the one in nixpkgs. |
Which branch are you using? Unstable has a reworked xonotic (different than 20.03). The xonotic from unstable/master is working on my side. What is you problem with xonotic? |
I used the default.nix from master. The biggest issues:
It's obvious from the package in master that especially player UIDs are not working because source/d0_blind_id is not built and linked, nor is the public key copied over to the installation path. Also the xolonium font can't work since the freetype shared library path is not patchElf'ed in. |
Freetype is not marked missing via ldd. Will it help to supply it as build input, or is there some type of compile flag to include it? How to build source/d0_blind_id? is the key available in the source so we can just copy it? I would like to stay with a build from source, and also don't include the xonotic data in the cache because it would get massive. |
Oh and i just confirmed that cl_capturevideo 1 works now to capture videos during the game.. Which doesn't work in the original derivation either because libvorbis/theora/ogg are not linked against and patchElf'ed in (they are looked up at runtime). |
Yeah, xonotic is somewhat special in that it looks up quite a few libraries at runtime and not at linktime. You need to actually play the game to notice the missing libraries ;) freetype as well as quite a few others need to be available as buildInput AND additionally pathElf'ed in as --needed.
d0_blind_id gets built normally by the shipped Makefile. The public key is copied in the installPhase in my PR.
The derivation in my PR is a build from source. I'm using the Makefile shipped with the release zip (which ships the source as well). try with
nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./default.nix {}'
I understand your point now about the storage space in the cache if the data is included. I will look and transfer my changes over to the original package later today then. |
If I see it correctly we can build the key with this command (from the download root):
This could help as to still have the three different xonotic versions. Also for download time I would prefer to stick to the source zip, as it's much smaller. |
Yeah, that command builds the d0_blind_id library which is needed for player UIDs to work. Additionally the public key key_0.d0pk needs to be copied over to the right location during install. There is also the quakeC (gmqcc) compiler shipped with the source which needs to be built, too, for the quakeC code to be built from source. For that to succeed the shebang in source/qcsrc/tools/qcc.sh needs to be patched and the PATH set during the buildPhase. Like I said. I can take the time later tonight to move all the fixes over to the original xonotic derivation. |
I will open a new PR with the updated expression |
this looks to me now like a mostly functioning version of xonotic. The build is linux specific though
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)