mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
pycuda: fix opengl runpath
This is required for CUDA functionality, since libcuda.so.1 is loaded from /run/opengl-driver/lib
This commit is contained in:
parent
96f048e3d0
commit
f52daac15c
1 changed files with 12 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
{ buildPythonPackage
|
||||
, addOpenGLRunpath
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, Mako
|
||||
|
@ -40,6 +41,13 @@ buildPythonPackage rec {
|
|||
ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
find $out/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
|
||||
echo "setting opengl runpath for $lib..."
|
||||
addOpenGLRunpath "$lib"
|
||||
done
|
||||
'';
|
||||
|
||||
# Requires access to libcuda.so.1 which is provided by the driver
|
||||
doCheck = false;
|
||||
|
||||
|
@ -47,6 +55,10 @@ buildPythonPackage rec {
|
|||
py.test
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
addOpenGLRunpath
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
pytools
|
||||
|
|
Loading…
Reference in a new issue