Skip to content

Add common dependencies upstream #42

Description

@axelkar

Could you add some options to add common dependencies like the ones for winit or tauri, iced, bevy1, etc.?

It's be great to have a single source of truth for stuff like this that's a hard thing for Nix users and newcomers.

Examples include:

  • vulkan-loader must be in LD_LIBRARY_PATH for Vulkan (used in wgpu, and through that GUI libraries) to work
  • libGL (not libglvnd directly, which breaks Darwin and Android support) must be in buildPackages for OpenGL to work
  • libxkbcommon, Wayland, and Xorg packages must be in LD_LIBRARY_PATH for Winit to work
  • fontconfig and freetype are often used in GUI libraries

Could this even be automatic by reading Cargo.lock?

Footnotes

  1. Specifying env.RUSTFLAGS = "-C link-arg=-fuse-ld=lld"; through Nix may be a better way than through .cargo/config.toml so that all contributors without Nix aren't forced into using LLD, and it keeps LLD in nativeBuildInputs near the code that makes Rust use it. Also, (big one): you don't need templates to do this that can go obsolete after applying them!!!! Adding -Zshare-generics=y on nightly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions