Skip to content

Conversation

@shenawy29
Copy link

This PR creates a flake.nix file for Nix users on Linux and MacOS.

What does this allow?

  1. This allows Nix users on *Nix to create ephemeral shells with Diligent headers and shared libraries already in the required paths. A single nix develop "git+https://github.com/DiligentGraphics/DiligentEngine.git?submodules=1" command from the terminal puts the caller in a shell with DiligentEngine installed.
    There is a shorter command: nix develop github:DiligentGraphics/DiligentEngine but it doesn't work with submodules and Diligent makes heavy use of git submodules.

  2. Other projects using Nix flakes for their dependency management can easily integrate Diligent into their dependencies.

  3. This also allows easy dependency management for Diligent. The flake file will always build diligent with the suggested clang compiler as described in the README, fetching all the required libraries.

I want to note that I only tested this on a NixOS machine, and it's very likely for this flake to fail to build on MacOS. Feedback would be appreciated.

If #352 gets solved, integrating Diligent into a project will be as easy as installing it and finding it using CMake's find_package.

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