[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 02:01:25 CET 2015
Well, I am mostly user-level in NixOS.
I modify my /etc/nixos/configuration.nix then #nixos-rebuild -switch
I am learning GO.
I have been able to get ncurses to work in go.
I was now trying with SDL:
[guest at nixos:~]$ go get -v github.com/veandco/go-sdl2/sdl{,_mixer,_image,_ttf}
github.com/veandco/go-sdl2/sdl
# github.com/veandco/go-sdl2/sdl
In file included from go/src/github.com/veandco/go-sdl2/sdl/syswm.go:9:0:
/nix/store/0lryp5ww28x21l74mmh42gnv6xdp45bw-SDL2-2.0.3/include/SDL2/SDL_syswm.h:70:22:
fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
^
compilation terminated.
[guest at nixos:~]$
Well, I can vaguely understand I should build this, with a nix
expression giving me go and Xlib as a "dependency".
But, although I did read about nix expressions, I never really wrote any.
In my configuration.nix I have:
environment.systemPackages = with pkgs; [
wget
firefoxWrapper
wineUnstable
winetricks
go
xlibs.libX11
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer
SDL2_net
dmd
mercurial
git
pkgconfig
gcc
...
[guest at nixos:~]$ ls -l $GOPATH
total 12
drwxr-xr-x 2 guest users 4096 Mar 17 23:46 bin
drwxr-xr-x 3 guest users 4096 Mar 17 23:26 pkg
drwxr-xr-x 4 guest users 4096 Mar 17 23:19 src
[guest at nixos:~]$ echo $GOPATH
/home/guest/go
[guest at nixos:~]$
Don't know if there is some package I can add to my
environment.systemPackages... or if I need some sophisticated nix
expression.
More information about the nix-dev
mailing list