Change:
''; configToml = if configTemplatePath != null then configTemplatePath else (formats.toml { }).generate "config.toml" configTemplate; <ins> # From https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/03cbf9c6cd26c75afef8a2dd68e0306aace80401/Makefile#L54 cliVersionPackage = "github.com/NVIDIA/nvidia-container-toolkit/internal/info"; </ins> in buildGoModule rec { pname = "container-toolkit/container-toolkit"; <del> version = "1.9.0"; </del> <ins> version = "1.15.0-rc.3"; </ins> src = fetchFromGitLab { owner = "nvidia"; repo = pname; rev = "v${version}"; <del> hash = "sha256-b4mybNB5FqizFTraByHk5SCsNO66JaISj18nLgLN7IA="; </del> <ins> hash = "sha256-IH2OjaLbcKSGG44aggolAOuJkjk+GaXnnTbrXfZ0lVo="; </ins> }; vendorHash = null; <ins> patches = [ # This patch causes library lookups to first attempt loading via dlopen # before falling back to the regular symlink location and ldcache location. ./0001-Add-dlopen-discoverer.patch ]; </ins> postPatch = '' <del> # replace the default hookDefaultFilePath to the $out path substituteInPlace cmd/nvidia-container-runtime/main.go  --replace '/usr/bin/nvidia-container-runtime-hook' '${placeholder "out"}/bin/nvidia-container-runtime-hook' </del> <ins> # Replace the default hookDefaultFilePath to the $out path and override # default ldconfig locations to the one in nixpkgs. substituteInPlace internal/config/config.go  --replace '/usr/bin/nvidia-container-runtime-hook' "$out/bin/nvidia-container-runtime-hook"  --replace '/sbin/ldconfig' '${lib.getBin glibc}/sbin/ldconfig' substituteInPlace internal/config/config_test.go  --replace '/sbin/ldconfig' '${lib.getBin glibc}/sbin/ldconfig' substituteInPlace tools/container/toolkit/toolkit.go  --replace '/sbin/ldconfig' '${lib.getBin glibc}/sbin/ldconfig' substituteInPlace cmd/nvidia-ctk/hook/update-ldcache/update-ldcache.go  --replace '/sbin/ldconfig' '${lib.getBin glibc}/sbin/ldconfig' </ins> ''; <del> ldflags = [ "-s" "-w" ]; </del> <ins> # Based on upstream's Makefile: # https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/03cbf9c6cd26c75afef8a2dd68e0306aace80401/Makefile#L64 ldflags = [ "-extldflags=-Wl,-z,lazy" # May be redunandant, cf. `man ld`: "Lazy binding is the default". "--strip-all" # May be redundant. Upstream: "-s". # Omitting the upstream flag: "-w" (suppresses errors and warnings). "--discard-locals" # May be redundant. Upstream: "-X". "${cliVersionPackage}.version=${version}" ]; </ins> <del> nativeBuildInputs = [ makeWrapper ]; </del> <ins> nativeBuildInputs = [ cudaPackages.autoAddOpenGLRunpathHook makeWrapper ]; </ins> preConfigure = '' # Ensure the runc symlink isn't broken:

Discussion:
Project description The NVIDIA Container Toolkit CLI provides a number of utilities that are useful for working with the NVIDIA Container Toolkit. Metadata homepage URL: source URL: license: Apache License platforms: linux More Info Looks some of the related tools for the container runtime. Have already been included. But not . Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:

Package name: Latest released version: <!-- Search your package here: --- Current version on the unstable channel: Current version on the stable/release channel: <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. -- Latest nvidia driver , which is linked against. for inclusion of into a container. Without it, OpenGL inside container is broken. Note for maintainers: Please tag this issue in your PR. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
As a workaround, I mount into the container explicitly.