mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
template patch with addOpenGLRunpath
This commit is contained in:
parent
27513ed374
commit
7650f5f86f
@ -11,7 +11,7 @@ index 56d908f..1de0b97 100644
|
||||
+ nvmlLib = CDLL("libnvidia-ml.so.1")
|
||||
+ except OSError:
|
||||
+ # assume NixOS
|
||||
+ nvmlLib = CDLL("/run/opengl-driver/lib/libnvidia-ml.so.1")
|
||||
+ nvmlLib = CDLL("@driverLink@/lib/libnvidia-ml.so.1")
|
||||
except OSError as ose:
|
||||
_nvmlCheckReturn(NVML_ERROR_LIBRARY_NOT_FOUND)
|
||||
if (nvmlLib == None):
|
||||
|
@ -1,8 +1,10 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, substituteAll
|
||||
, pythonOlder
|
||||
, cudatoolkit
|
||||
, addOpenGLRunpath
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -16,7 +18,10 @@ buildPythonPackage rec {
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-locate-libnvidia-ml.so.1-on-NixOS.patch
|
||||
(substituteAll {
|
||||
src = ./0001-locate-libnvidia-ml.so.1-on-NixOS.patch;
|
||||
inherit (addOpenGLRunpath) driverLink;
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ cudatoolkit ];
|
||||
|
Loading…
Reference in New Issue
Block a user