Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 16 lines 615 B view raw
1addSDLPath () { 2 if [ -e "$1/include/SDL" ]; then 3 export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL" 4 # NB this doesn’t work with split dev packages because different packages 5 # will contain "include/SDL/" and "lib/" directories. 6 # 7 # However the SDL_LIB_PATH is consumed by SDL itself and serves to locate 8 # libraries like SDL_mixer, SDL_image, etc which are not split-package 9 # so the check above will only trigger on them. 10 if [ -e "$1/lib" ]; then 11 export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib" 12 fi 13 fi 14} 15 16addEnvHooks "$hostOffset" addSDLPath