Issue description
Currently, libgbm (a component of mesa) is linked into applications like any other library.
Last year, mesa stopped working properly with libgbm versions other than the one produced by the same version of mesa.
This is an issue because our mesa drivers are loaded impurely (from /run/opengl-driver) while libgbm is not, causing a mismatch.
This issue prevents a commonly thought to be supported use-case of running apps from a channel different to your system's channel (i.e. system from nixos-23.05, app foo from nixos-unstable) from working as it quite honestly should.
To fix that, we need to place and load libgbm from /run/opengl-driver.
Alternatively, we could ask the mesa people to support differing libgbm versions but that's a hard sell given that we're the only distro that might run into this issue.
Alternatively, alternatively, we could make mesa pure but that might not be desirable because you couldn't run older applications on newer hardware that wasn't supported at the time then anymore. Arguably though, that isn't the case right now either.
cc @K900
Issue description
Currently, libgbm (a component of mesa) is linked into applications like any other library.
Last year, mesa stopped working properly with libgbm versions other than the one produced by the same version of mesa.
This is an issue because our mesa drivers are loaded impurely (from
/run/opengl-driver) while libgbm is not, causing a mismatch.This issue prevents a commonly thought to be supported use-case of running apps from a channel different to your system's channel (i.e. system from nixos-23.05, app foo from nixos-unstable) from working as it quite honestly should.
To fix that, we need to place and load libgbm from
/run/opengl-driver.Alternatively, we could ask the mesa people to support differing libgbm versions but that's a hard sell given that we're the only distro that might run into this issue.
Alternatively, alternatively, we could make mesa pure but that might not be desirable because you couldn't run older applications on newer hardware that wasn't supported at the time then anymore. Arguably though, that isn't the case right now either.
cc @K900