Closed Firefnix closed 2 months ago
I appreciate this PR but I think it's outside the scope of this template.
Tested on NixOS unstable. The usual commands to compile with cmake work, except that I had to require the X11 lib in CMakeLists.txt by adding
find_package(X11 REQUIRED)
Do you still have to do this when compiling SFML on its own in NixOS? Our build scripts have a fair bit of OS-specific branches for dealing with platform APIs like X11 and perhaps we're not properly handing the NixOS case.
We don't want to provide OS specific build scripts. Maybe we can extend the readme for other distributions than Debian or Ubuntu for installing dependencies.
You shouldn't be needing to explicitly search for X11, unless you write X11 code in your own application. If you need to do that currently, it seems like an issue within SFML's CMake scripts, feel free to open an issue on the main repo with more details provided.
Add Nix-shell script for Nix / NixOS users
Tested on NixOS unstable. The usual commands to compile with cmake work, except that I had to require the X11 lib in
CMakeLists.txt
by addingFeel free to add a line about this in
CMakeLists.txt
too, as it seems required for Linux-based systems (even those running on Wayland-based environments). I did not include anything about this in this branch as it is beyond its scope I think.As a reminder, to activate the nix-shell (just like you would with a Python
virtualenv
), just donix-shell
in the project's root directory. In this shell, you can then build withas you would on any other Linux distro.