Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hard-code file names when making symbolic links for drivers #383

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,25 @@ in
extraPackages = mkIf cfg.useWindowsDriver [
(pkgs.runCommand "wsl-lib" { } ''
mkdir "$out"
ln -s /usr/lib/wsl/lib "$out/lib"
# # we cannot just symlink the lib directory because it breaks merging with other drivers that provide the same directory
ln -s /usr/lib/wsl/lib/libcudadebugger.so.1 "$out/lib"
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
ln -s /usr/lib/wsl/lib/libcuda.so "$out/lib"
ln -s /usr/lib/wsl/lib/libcuda.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libcuda.so.1.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libd3d12core.so "$out/lib"
ln -s /usr/lib/wsl/lib/libd3d12.so "$out/lib"
ln -s /usr/lib/wsl/lib/libdxcore.so "$out/lib"
ln -s /usr/lib/wsl/lib/libnvcuvid.so "$out/lib"
ln -s /usr/lib/wsl/lib/libnvcuvid.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libnvdxdlkernels.so "$out/lib"
ln -s /usr/lib/wsl/lib/libnvidia-encode.so "$out/lib"
ln -s /usr/lib/wsl/lib/libnvidia-encode.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libnvidia-ml.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libnvidia-opticalflow.so "$out/lib"
ln -s /usr/lib/wsl/lib/libnvidia-opticalflow.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libnvoptix.so.1 "$out/lib"
ln -s /usr/lib/wsl/lib/libnvwgf2umx.so "$out/lib"
ln -s /usr/lib/wsl/lib/nvidia-smi "$out/lib"
'')
];
};
Expand Down
Loading