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

glfw3: general improvements #358007

Merged
merged 7 commits into from
Nov 23, 2024

Conversation

Scrumplex
Copy link
Member

@Scrumplex Scrumplex commented Nov 21, 2024

Closes #357732
Closes #356975

Each commit has a description describing its primary change.

The formatting commit is last, to make reviewing easier. The evaluation should not change between HEAD and HEAD^

One fairly simple package to test these changes with is raylib-games. I was able to build and run asteroids both on XWayland and Wayland.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

CMAKE_C_FLAGS did not work previously, as it was defined multiple times.
Instead of fixing it, it is much more readable to use NIX_CFLAGS_COMPILE
instead of having to escape special characters across Nix, Bash and
CMake

Signed-off-by: Sefa Eyeoglu <[email protected]>
Including quotes around the library names should make these
substitutions stricter.

Signed-off-by: Sefa Eyeoglu <[email protected]>
libX11-xcb.so.1 and libXxf86vm.so.1 are dlopen-ed at runtime, but are
not linked by the linker. Let's hardcode their library paths into the
code.

Signed-off-by: Sefa Eyeoglu <[email protected]>
The new apple-sdk pattern doesn't require this anymore.

Signed-off-by: Sefa Eyeoglu <[email protected]>
Signed-off-by: Sefa Eyeoglu <[email protected]>
Signed-off-by: Sefa Eyeoglu <[email protected]>
@Scrumplex Scrumplex force-pushed the pkgs/glfw/general-improvements branch from cb0a034 to 00b5f4e Compare November 21, 2024 22:43
@Scrumplex
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 358007


x86_64-linux

⏩ 2 packages marked as broken and skipped:
  • chickenPackages_5.chickenEggs.hypergiant
  • libsForQt5.mapbox-gl-native
❌ 4 packages failed to build:
  • icesl
  • meshlab
  • orca-slicer
  • orca-slicer.debug
✅ 110 packages built:
  • _2ship2harkinian
  • bambu-studio
  • bambu-studio.debug
  • blackshades
  • blender
  • blender-hip
  • blendfarm
  • bottles
  • bottles-unwrapped
  • cemu
  • chickenPackages_5.chickenEggs.glfw3
  • cpu-x
  • djv
  • dxvk_2
  • eepers
  • embree
  • embree2
  • envision
  • esshader
  • famistudio
  • glfw
  • glfw3-minecraft
  • gnuradioPackages.fosphor
  • goxel
  • gr-framework
  • heroic
  • hmcl
  • imgui
  • imgui.lib
  • imhex
  • imnodes
  • imnodes.dev
  • implot
  • io
  • librealsense-gui
  • librealsense-gui.dev
  • libsForQt5.maplibre-gl-native
  • linux-wallpaperengine
  • mangl
  • mangohud
  • mangohud.doc
  • mangohud.man
  • midivisualizer
  • mlx42
  • mmlgui
  • monado
  • mujoco
  • openmvs
  • openusd
  • picocrypt
  • pixelnuke
  • portablemc
  • portablemc.dist
  • prismlauncher
  • python311Packages.ale-py
  • python311Packages.ale-py.dist
  • python311Packages.dm-control
  • python311Packages.dm-control.dist
  • python311Packages.glfw
  • python311Packages.glfw.dist
  • python311Packages.gymnasium
  • python311Packages.gymnasium.dist
  • python311Packages.minari
  • python311Packages.minari.dist
  • python311Packages.mujoco
  • python311Packages.mujoco.dist
  • python311Packages.openusd
  • python311Packages.pettingzoo
  • python311Packages.pettingzoo.dist
  • python311Packages.pymeshlab (python312Packages.pymeshlab)
  • python311Packages.raylib-python-cffi
  • python311Packages.raylib-python-cffi.dist
  • python311Packages.shimmy
  • python311Packages.shimmy.dist
  • python311Packages.skrl
  • python311Packages.skrl.dist
  • python311Packages.torchrl
  • python311Packages.torchrl.dist
  • python312Packages.dm-control
  • python312Packages.dm-control.dist
  • python312Packages.glfw
  • python312Packages.glfw.dist
  • python312Packages.mujoco
  • python312Packages.mujoco.dist
  • python312Packages.openusd
  • python312Packages.raylib-python-cffi
  • python312Packages.raylib-python-cffi.dist
  • raylib
  • raylib-games
  • sbclPackages.cl-glfw
  • sbclPackages.cl-glfw3
  • sbclPackages.cl-glfw3-examples
  • sbclPackages.kons-9
  • scopehal-apps
  • sdrpp
  • silice
  • snekim
  • sony-headphones-client
  • space-station-14-launcher
  • taisei
  • tev
  • tracy
  • tracy-x11
  • vcv-rack
  • vk-bootstrap
  • vk-bootstrap.dev
  • vkdt
  • vlang
  • wlay
  • woomer

x86_64-darwin

⏩ 21 packages marked as broken and skipped:
  • blender
  • chickenPackages_5.chickenEggs.hypergiant
  • esshader
  • mujoco
  • python311Packages.dm-control
  • python311Packages.dm-control.dist
  • python311Packages.mujoco
  • python311Packages.mujoco.dist
  • python311Packages.shimmy
  • python311Packages.shimmy.dist
  • python311Packages.torchrl
  • python311Packages.torchrl.dist
  • python312Packages.dm-control
  • python312Packages.dm-control.dist
  • python312Packages.mujoco
  • python312Packages.mujoco.dist
  • python312Packages.shimmy
  • python312Packages.shimmy.dist
  • python312Packages.torchrl
  • python312Packages.torchrl.dist
  • tev
❌ 5 packages failed to build:
  • gr-framework
  • openusd
  • python311Packages.openusd
  • python312Packages.openusd
  • wlay
✅ 37 packages built:
  • chickenPackages_5.chickenEggs.glfw3
  • embree
  • famistudio
  • glfw
  • glfw3-minecraft
  • hmcl
  • imhex
  • librealsense-gui
  • librealsense-gui.dev
  • midivisualizer
  • mlx42
  • mmlgui
  • openmvs
  • picocrypt
  • python311Packages.glfw
  • python311Packages.glfw.dist
  • python311Packages.raylib-python-cffi
  • python311Packages.raylib-python-cffi.dist
  • python312Packages.glfw
  • python312Packages.glfw.dist
  • python312Packages.raylib-python-cffi
  • python312Packages.raylib-python-cffi.dist
  • raylib
  • raylib-games
  • sbclPackages.cl-glfw
  • sbclPackages.cl-glfw3
  • sbclPackages.cl-glfw3-examples
  • sbclPackages.kons-9
  • scopehal-apps
  • sdrpp
  • silice
  • snekim
  • taisei
  • tracy (tracy-x11)
  • vk-bootstrap
  • vk-bootstrap.dev
  • vlang

aarch64-darwin

⏩ 21 packages marked as broken and skipped:
  • blender
  • chickenPackages_5.chickenEggs.hypergiant
  • esshader
  • mujoco
  • python311Packages.dm-control
  • python311Packages.dm-control.dist
  • python311Packages.mujoco
  • python311Packages.mujoco.dist
  • python311Packages.shimmy
  • python311Packages.shimmy.dist
  • python311Packages.torchrl
  • python311Packages.torchrl.dist
  • python312Packages.dm-control
  • python312Packages.dm-control.dist
  • python312Packages.mujoco
  • python312Packages.mujoco.dist
  • python312Packages.shimmy
  • python312Packages.shimmy.dist
  • python312Packages.torchrl
  • python312Packages.torchrl.dist
  • tev
❌ 2 packages failed to build:
  • gr-framework
  • wlay
✅ 40 packages built:
  • chickenPackages_5.chickenEggs.glfw3
  • embree
  • famistudio
  • glfw
  • glfw3-minecraft
  • hmcl
  • imhex
  • librealsense-gui
  • librealsense-gui.dev
  • midivisualizer
  • mlx42
  • mmlgui
  • openmvs
  • openusd
  • picocrypt
  • python311Packages.glfw
  • python311Packages.glfw.dist
  • python311Packages.openusd
  • python311Packages.raylib-python-cffi
  • python311Packages.raylib-python-cffi.dist
  • python312Packages.glfw
  • python312Packages.glfw.dist
  • python312Packages.openusd
  • python312Packages.raylib-python-cffi
  • python312Packages.raylib-python-cffi.dist
  • raylib
  • raylib-games
  • sbclPackages.cl-glfw
  • sbclPackages.cl-glfw3
  • sbclPackages.cl-glfw3-examples
  • sbclPackages.kons-9
  • scopehal-apps
  • sdrpp
  • silice
  • snekim
  • taisei
  • tracy (tracy-x11)
  • vk-bootstrap
  • vk-bootstrap.dev
  • vlang

@ofborg ofborg bot requested a review from MarcWeber November 22, 2024 18:09
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500 labels Nov 22, 2024
@diniamo
Copy link
Contributor

diniamo commented Nov 23, 2024

Nice, thanks. Not sure how this stuff works exactly, but as a reminder, this should be backported, right?

Also, on the note of raylib-games, it would be be great to get #357729 merged as well, which updates raylib (and adds a platform argument to allow using SDL), and pretty much rewrites the entire definition, since it was mostly wrong.

@Scrumplex Scrumplex added the backport release-24.11 Backport PR automatically label Nov 23, 2024
@Scrumplex Scrumplex removed the backport release-24.11 Backport PR automatically label Nov 23, 2024
@Scrumplex
Copy link
Member Author

The issue(s) fixed by this PR shouldn't be present in 24.11, as #354761 was not backported. I will backport both that and this PR once this is merged.

@Scrumplex
Copy link
Member Author

Regarding my nixpkgs-review result above:

x86_64-linux

  • icesl: wrong src hash, same failure on master
  • meshlab: unrelated failure on my builder. I was able to build it successfully
  • orca-slicer: actually builds 🤔

both darwins:

  • gr-framework: fails on master
  • openusd: fails on master
  • wlay: fails on master

@Scrumplex Scrumplex merged commit 9ef8694 into NixOS:master Nov 23, 2024
42 of 44 checks passed
@Scrumplex Scrumplex deleted the pkgs/glfw/general-improvements branch November 23, 2024 17:58
@Scrumplex Scrumplex added the backport release-24.11 Backport PR automatically label Nov 23, 2024
Copy link
Contributor

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500 11.by: package-maintainer This PR was created by the maintainer of the package it changes backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

glfw: EGL library not found imhex: EGL: Library not found
2 participants