Skip to content

Modularize - allow system dependencies#4

Closed
arntanguy wants to merge 4 commits intomc-rtc:mainfrom
arntanguy:topic/nix-modular
Closed

Modularize - allow system dependencies#4
arntanguy wants to merge 4 commits intomc-rtc:mainfrom
arntanguy:topic/nix-modular

Conversation

@arntanguy
Copy link
Copy Markdown
Contributor

@arntanguy arntanguy commented Mar 20, 2026

Superseeds / complements #3

This PR lets us build mc_rtc-magnum against its dependencies installed externally:

  • For mc_rtc-imgui: Standalone install mc_rtc-imgui#25
  • magnum, magnum-plugins, magnum-integrations have been packaged in mc-rtc/nixpkgs
  • imgui and implot already have official nixpkgs support

The intent is:

  • Make the dependency chain clearer (in particular w.r.t glfw)
  • Clearly distinguish mc-rtc integration code from Magnum/Magnum plugins/Imgui/Imgui plugins
  • Make compilation time much faster (only 11 targets to compile here vs ~150 otherwise).
  • To help debug Use standalone MuJoCo 3.3.6 and jrl-cmakemodules v2 rohanpsingh/mc_mujoco#98 by better decoupling which version of glfw we're linking against.

FIXME: it's working in nix, but:

TODO:
I took a brutal approach here and nuked all submodules and their use thereof from the repo. But I probably need to re-introduce a way to have optional local install of all dependencies for non-nix systems, probably some straightforward FetchContent in case the system dependency is unavailable.

@arntanguy
Copy link
Copy Markdown
Contributor Author

Scaling issue reported upstream to glfw/glfw#2839

The following works as expected

XDG_SESSION_TYPE="" WAYLAND_DISPLAY="" mc-rtc-magnum

but with the default env variables it fails

mc_rtc_magnum
XDG_SESSION_TYPE="wayland" WAYLAND_DISPLAY="wayland-1" mc-rtc-magnum

- This works in nix for now
- For magnum plugins, we need to symlink them all into the same store
path and provide the directory through a cmake variable (this is done by
Nix)
- ImGuizmo still not done
@arntanguy arntanguy force-pushed the topic/nix-modular branch 2 times, most recently from 3945632 to 5b6fe23 Compare March 24, 2026 18:12
@arntanguy
Copy link
Copy Markdown
Contributor Author

I tried supporting this on non nix build, but gave up.

Thus for now I'll merge this into a nix branch and use it for nix packaging, and keep master as-is. Hopefully in the future there will be decent packaging of these dependencies.

@arntanguy
Copy link
Copy Markdown
Contributor Author

arntanguy commented Mar 24, 2026

Rebased into a single commit (for easier rebasing) and pushed to nix branch 97eb246

@arntanguy arntanguy closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant