git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120285 from r-burns/pycuda

pycuda: fix opengl runpath

commite7893cdf1db33001a54a489f22410d10da20dc25 authorDaniël de Kok <me@danieldk.eu> dateFri 23 Apr 2021, 07:51 (6 years ago) parent7bd3badf52daac
1 file changed+12
pkgs/development/python-modules/pycuda/default.nix+12
pkgs/development/python-modules/pycuda/default.nix+12
@@ -1,4 +1,5 @@
11{ buildPythonPackage
2+, addOpenGLRunpath
23, fetchPypi
34, fetchFromGitHub
45, Mako
@@ -40,6 +41,13 @@ buildPythonPackage rec {
4041 ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte
4142 '';
4243
44+ postFixup = ''
45+ find $out/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
46+ echo "setting opengl runpath for $lib..."
47+ addOpenGLRunpath "$lib"
48+ done
49+ '';
50+
4351 # Requires access to libcuda.so.1 which is provided by the driver
4452 doCheck = false;
4553
@@ -47,6 +55,10 @@ buildPythonPackage rec {
4755 py.test
4856 '';
4957
58+ nativeBuildInputs = [
59+ addOpenGLRunpath
60+ ];
61+
5062 propagatedBuildInputs = [
5163 numpy
5264 pytools