Evaluating nixpkgs is quite expensive and should be done only once if
possible. This allows to pass a correctly-configured instance of nixpkgs
(with allowUnfree = true).
Unfortunately this requires to break the current interface.
nvidia_x11 was overrode in an overlay. It is no longer the case and the
override is now explicit.
This will allows the creation of a `nixGL.nix` file callable with
`callPackage`. This change is a preliminary work for inclusion in
`nixpkgs`, as requested in #16.
It will also highly improve the use on nixGL in other project because
user won't have to pass a non initialized `nixpkgs`.
The automatic detection uses the /proc interface proposed by the Nvidia
kernel module.
Having autodetection inside nix, I also changed the way the driver is
fetched, so everything is done inside nix. So no more `nvidiaInstall`
wrapper script.
I updated the `README` accordingly.
This closes#30. OpenGL support for 32bit is unconditionnally added to
nixGLIntel.
- Nvidia with bumblebee seems to work out of the box. I don't know why.
- I don't have the hardware to test vulkan.
- I don't have the hardware to test pure nvidia.
Recently, most packages which were previously depending on `mesa`
switched to `libGL`, which is supposed to find the host system opengl
library, as long as it is available in the library search path.
Hash of nvidia driver is not known because it depends on the driver version
(argument `nvidiaVersion`). However, since nix 2.0 and when using `useSandbox`,
`sha256 = null` is not allowed anymore.
The new wrapper script, `nvidiaInstall.py` uses `nix-prefetch-url` to compute
the hash and call `nix`.
This is a fix for #9