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

Domen Kožar domen at dev.si
Thu Mar 19 09:43:23 CET 2015


Try to create a shell with Xlib headers:

$ nix-shell -p xorg.libX11

On Thu, Mar 19, 2015 at 2:01 AM, Paul Dufresne <dufresnep at gmail.com> wrote:

> 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.
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150319/7225152e/attachment.html 


More information about the nix-dev mailing list