nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
712 stars 80 forks source link

How to use auto.nixGLDefault? #85

Closed mjrogozinski closed 3 years ago

mjrogozinski commented 3 years ago

Hi,

I have installed the nixGL successfully using commands from the instruction:

$ nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update
$ nix-env -iA nixgl.auto.nixGLDefault

I am trying to use what I have just installed in a shell.nix like this one:

with import <nixpkgs> {};
stdenv.mkDerivation {
    name = "haskell";
    buildInputs = [
        someIrrelevantDependencies
    ];

    shellHook = ''
        export LD_LIBRARY_PATH=$(nixGLNvidia printenv LD_LIBRARY_PATH):$LD_LIBRARY_PATH
    '';
}

How to make the nixGL wrappers available inside the nix-shell created using such a script?

Sorry for the dumb question. I am probably missing something obvious here.

mjrogozinski commented 3 years ago

It turned out that nixGL is available in my shell.

I am closing this ticket. It is probably obvious for everyone that after installing nixGL with nix-env -iA, it will be available globally.