[Nix-dev] Xlib.h not found on go get -v github.com/veandco/go-sdl2/sdl

Paul Dufresne dufresnep at gmail.com
Thu Mar 19 11:34:31 CET 2015


2015-03-19 4:43 GMT-04:00 Domen Kožar <domen at dev.si>:
> Try to create a shell with Xlib headers:
>
> $ nix-shell -p xorg.libX11
Yes, this works, thanks a lot!

More precisely:
[guest at nixos:~]$ nix-shell -p xorg.libX11 SDL2 SDL2_gfx SDL2_image
SDL2_mixer SDL2_net
[nix-shell:~]$ go get -v github.com/veandco/go-sdl2/sdl{,_mixer,_image,_ttf}
github.com/veandco/go-sdl2/sdl_mixer
github.com/veandco/go-sdl2/sdl_image
github.com/veandco/go-sdl2/sdl_ttf
# github.com/veandco/go-sdl2/sdl_ttf
In file included from go/src/github.com/veandco/go-sdl2/sdl_ttf/sdl_ttf.go:7:0:
sdl_ttf_wrapper.h:4:22: fatal error: SDL_ttf.h: No such file or directory
  #include <SDL_ttf.h>
                      ^
compilation terminated.

[nix-shell:~]$ go get -v github.com/veandco/go-sdl2/sdl{,_mixer,_image}
[guest at nixos:~]$ go install github.com/dufresnep/sdl2test

[guest at nixos:~]$ sdl2test

So, once the go get is done (without SDL2_ttf that we don't seems to
have but that is optional anyway), my test program did compiled and
run outside of nix-shell, which is really what I wanted.


More information about the nix-dev mailing list