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

quake3e: init at 2019-09-09 #69216

Merged
merged 1 commit into from Oct 2, 2019
Merged

quake3e: init at 2019-09-09 #69216

merged 1 commit into from Oct 2, 2019

Conversation

pmiddend
Copy link
Contributor

Motivation for this change

I wanted this package in nixpkgs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-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 CONTRIBUTING.md.

@pmiddend
Copy link
Contributor Author

@jonringer Thanks for the review. I've fixed your suggestions.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
(I don't won quake3, so i can't test)
leaf package

@pmiddend
Copy link
Contributor Author

pmiddend commented Oct 2, 2019

Any update on this?

@jonringer
Copy link
Contributor

builds fine, I would just like for someone else who owns quake, to also verify that it works :/

Copy link
Member

@Lassulus Lassulus left a comment

Choose a reason for hiding this comment

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

tested with nix-review, played a round against bots (and won)

@Lassulus Lassulus merged commit 4ec79e8 into NixOS:master Oct 2, 2019
enableParallelBuilding = true;

postPatch = ''
sed -i -e 's#OpenGLLib = dlopen( dllname#OpenGLLib = dlopen( "${libGL}/lib/libGL.so"#' code/unix/linux_qgl.c
Copy link
Contributor

Choose a reason for hiding this comment

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

code/client/cl_curl.c tries to load libcurl.so, is there a reason not to patch the loader?

sed -i -e 's#Sys_LoadLibrary( "libXrandr.so.2" )#Sys_LoadLibrary( "${libXrandr}/lib/libXrandr.so.2" )#' code/unix/x11_randr.c
sed -i -e 's#Sys_LoadLibrary( "libXxf86vm.so.1" )#Sys_LoadLibrary( "${libXxf86vm}/lib/libXxf86vm.so.1" )#' code/unix/x11_randr.c
sed -i -e 's#Sys_LoadLibrary( "libXxf86dga.so.1" )#Sys_LoadLibrary( "${libXxf86dga}/lib/libXxf86dga.so.1" )#' code/unix/x11_dga.c
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of patching the source code to get the right path to the library, two possible less intrusive proposals:

  1. you could change the build system and pass these libraries to the linker of the executable via LDFLAGS
  2. you could fix the missing RPATH in the executable after linking the execuable in the fixupPhase with patchelf

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

4 participants