2023-09-12 01:01:03 +03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
2023-09-13 01:01:25 +03:00
|
|
|
# stripping doesn't reduce the file size much, and it takes a long time
|
2023-09-12 01:01:03 +03:00
|
|
|
mkDerivation.dontStrip = true;
|
2023-09-13 01:01:25 +03:00
|
|
|
|
2023-09-13 14:50:19 +03:00
|
|
|
# use the autoAddOpenGLRunpathHook to add /run/opengl-driver/lib to the RPATH
|
|
|
|
# of all ELF files
|
|
|
|
deps = {nixpkgs, ...}: {
|
|
|
|
inherit (nixpkgs.cudaPackages) autoAddOpenGLRunpathHook;
|
|
|
|
};
|
|
|
|
mkDerivation.nativeBuildInputs = [
|
|
|
|
config.deps.autoAddOpenGLRunpathHook
|
|
|
|
];
|
|
|
|
|
2023-09-13 01:01:25 +03:00
|
|
|
# this file is patched manually, so ignore it in autoPatchelf
|
|
|
|
env.autoPatchelfIgnoreMissingDeps = ["libcuda.so.1"];
|
2023-09-12 01:01:03 +03:00
|
|
|
}
|