Skip to content

[WIP] libcapsule: init at 0.20240806.0; libglcapsule: init; libGL: point to libglcapsule and make supporting changes#337995

Draft
Pandapip1 wants to merge 3 commits intoNixOS:masterfrom
Pandapip1:init-libcapsule
Draft

[WIP] libcapsule: init at 0.20240806.0; libglcapsule: init; libGL: point to libglcapsule and make supporting changes#337995
Pandapip1 wants to merge 3 commits intoNixOS:masterfrom
Pandapip1:init-libcapsule

Conversation

@Pandapip1
Copy link
Copy Markdown
Member

@Pandapip1 Pandapip1 commented Aug 28, 2024

Description of changes

Fixes #9415

Fixes #31189

This will allow for applications that depend on libGL to be run on non-NixOS platforms. This will particularly be useful in the context of nix bundlers, such as https://github.com/ralismark/nix-appimage.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Aug 28, 2024
@NickCao
Copy link
Copy Markdown
Member

NickCao commented Aug 28, 2024

I'm a bit confused about the purpose of libglcapsule, since we already have libglvnd, which is more or less fixing the same problem.

Edited: https://people.collabora.com/~vivek/libcapsule.pdf is very informative! "Call an isolated set of libraries a capsule" do sound like a good solution.

@Pandapip1 Pandapip1 force-pushed the init-libcapsule branch 2 times, most recently from 15c1d4a to 3163476 Compare August 28, 2024 18:34
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package labels Aug 28, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Aug 28, 2024
@github-actions github-actions bot added the 6.topic: hardware Drivers, Firmware and Kernels label Nov 14, 2024
@liarokapisv
Copy link
Copy Markdown
Contributor

Just commenting to check on the progress of this PR

@Pandapip1
Copy link
Copy Markdown
Member Author

Pandapip1 commented Nov 17, 2024

Just commenting to check on the progress of this PR

Progress: ??? / ???, and this isn't my top priority right now (college course load is currently higher than average). libcapsule and mkCapsule build, but I don't know if they really work.

Copy link
Copy Markdown
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

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

Is it possible to PR this in a way that doesn't result in replacing the current libGL(X)? It seems a bit bold to replace libGL entirely without testing. (Also, mass-rebuild PRs would have to go to staging regardless.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
rev = "refs/tags/v${finalAttrs.version}";
tag = "v${finalAttrs.version}";

@Pandapip1
Copy link
Copy Markdown
Member Author

Pandapip1 commented Mar 22, 2025

I'll probably just remove the libgl changes from this PR altogether. The PR did a scope creep (which is why it targets master). I don't remember whether libcapsule and the builder I made work.

Definitely before replacing libgl, a lot of testing will be required. I'm thankfully on spring break the next week so I can finally get around to some of these PRs.

@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/runtime-issues-on-different-flake-package-channels/62305/2

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@Pandapip1 Pandapip1 added 2.status: work-in-progress and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels May 5, 2025
@Pandapip1 Pandapip1 changed the title libcapsule: init at 0.20240806.0; libglcapsule: init; libGL: point to libglcapsule and make supporting changes [WIP] libcapsule: init at 0.20240806.0; libglcapsule: init; libGL: point to libglcapsule and make supporting changes May 5, 2025
@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: hardware Drivers, Firmware and Kernels labels May 5, 2025
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TODO: Consider moving to pkgs/build-support

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 5, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Solve the libGL ABI problem libGL not working on non-NixOS (without setting up)

7 participants