apitrace fails to work on NixOS. I get "X screen is not using the NVIDIA driver" and "Failed to create EGL display" if I launch my gl application with apitrace.

$ apitrace trace --api gl /nix/store/ldaccwl6x32n6fmmw3w6wx337y63ffpm-wlroots/rootston/rootston 
apitrace: loaded into /nix/store/cvzpzmbj7yf288mmxi577y211pjxxyvv-apitrace-7.1-572-g26966134/bin/apitrace
apitrace: unloaded from /nix/store/cvzpzmbj7yf288mmxi577y211pjxxyvv-apitrace-7.1-572-g26966134/bin/apitrace
apitrace: loaded into /nix/store/ldaccwl6x32n6fmmw3w6wx337y63ffpm-wlroots/rootston/rootston
2020-10-07 16:20:35 - [rootston/config.c:541] No config file found. Using sensible defaults.
2020-10-07 16:20:35 - [EGL] eglGetPlatformDisplay: X screen is not using the NVIDIA driver.
2020-10-07 16:20:35 - [render/egl.c:130] Failed to create EGL display
2020-10-07 16:20:35 - [EGL] eglMakeCurrent: Invalid display (nil)
2020-10-07 16:20:35 - [render/wlr_renderer.c:216] Could not initialize EGL
2020-10-07 16:20:35 - [backend/x11/backend.c:293] Failed to create renderer
2020-10-07 16:20:35 - [backend/session/logind.c:663] Successfully loaded logind session
2020-10-07 16:20:35 - [backend/backend.c:157] Found 0 GPUs
2020-10-07 16:20:35 - [backend/backend.c:300] Failed to open any DRM device
2020-10-07 16:20:35 - [rootston/main.c:26] could not start backend

NOTE: The application runs fine if I launch it without apitrace.

Created: 2020-10-07 Wed 16:23

Validate