haskell-game/tiny-games-hs

Detect freeglut availability in play command, and help section for Nixos user regarding freeglut

hellwolf opened this issue · 1 comments

Would it be a good idea to add this advisory warning to the play command?

function detectAndWarnAboutGlut() {
  (LIBRARY_PATH=$LD_LIBRARY_PATH gcc -lglut --shared -o /dev/null &>/dev/null) || echo 'You should install freeglut in order to play some games'
}

Additionally, for NixOS user, this command may be useful, and can be added to README:

$ nix-shell -p freeglut # or install freeglut
$ export LD_LIBRARY_PATH=`nix eval --impure --raw --expr 'let pkgs = import <nixpkgs>{}; in pkgs.freeglut'`/lib;