#error runnig raylib example project on nixos

1 messages · Page 1 of 1 (latest)

verbal swan
#

i'm having the following error when i run the raylib example project on NixOS:

#

it's not a lack of installed package beacuse i already have a nix-shell which respectively was supposed to be installing everything related to X

#

if anyone uses or has used Odin on NixOS, give me some light, according to a friend it's a linker error, but i dont know how to fix it

frosty fox
#

can you run fetch in the terminal and show the result?

frosty fox
#

run it in the terminal

verbal swan
frosty fox
#

yeah. Is that the full output?

#

oh okay I wasn't familiar with nixos so I assumed the issue was that the right package wasn't installed

#

in reality it works more like python's venv, where for every piece of software you want to build you need to wrap it in a derivation
You might have some luck following this discussion as well as reading docs on your OS
https://discourse.nixos.org/t/cant-compile-dwm-x11-xlib-h-not-found/12633/4

buoyant rover
#

I use odin with raylib using this configuration in a shell.nix:

let pkgs = import <nixpkgs> { };
in pkgs.mkShell {
  buildInputs = with pkgs; [
    libGL
    xorg.libX11
    xorg.libXi

    # needed for raylib
    xorg.libXcursor
    xorg.libXrandr
    xorg.libXinerama
  ];
  LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
    with pkgs;
    pkgs.lib.makeLibraryPath [ libGL xorg.libX11 xorg.libXi ]
  }";
}
verbal swan