2 pkgs ? import <nixpkgs> { },
6 pkgs.runCommandNoCC "${feature}-present" { requiredSystemFeatures = [ feature ]; } ''
7 if [[ ! -e /${feature}-files ]]; then
8 echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2
11 libcudaLocation=/run/opengl-driver/lib/libcuda.so
12 if [[ -e "$libcudaLocation" || -h "$libcudaLocation" ]] ; then
15 echo "The host declares ${feature} support, but it the hook fails to handle the hostPath != guestPath cases" >&2
18 if cat "$libcudaLocation" | xargs test fakeContent = ; then
21 echo "The host declares ${feature} support, but it seems to fail to follow symlinks" >&2
22 echo "The content of /run/opengl-driver/lib/libcuda.so is: $(cat /run/opengl-driver/lib/libcuda.so)" >&2