pythonPackages.libgpuarray: fix opengl runpath
nvidia_x11 libs should be picked up from /run/opengl-driver/lib at runtime
This commit is contained in:
parent
eb71bcd041
commit
11bf0ac25b
@ -1,5 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
|
, addOpenGLRunpath
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
@ -8,13 +9,10 @@
|
|||||||
, six
|
, six
|
||||||
, nose
|
, nose
|
||||||
, Mako
|
, Mako
|
||||||
, cudaSupport ? false, cudatoolkit , nvidia_x11
|
, cudaSupport ? false, cudatoolkit
|
||||||
, openclSupport ? true, ocl-icd, clblas
|
, openclSupport ? true, ocl-icd, clblas
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert cudaSupport -> nvidia_x11 != null
|
|
||||||
&& cudatoolkit != null;
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "libgpuarray";
|
pname = "libgpuarray";
|
||||||
version = "0.7.6";
|
version = "0.7.6";
|
||||||
@ -32,8 +30,7 @@ buildPythonPackage rec {
|
|||||||
configurePhase = "cmakeConfigurePhase";
|
configurePhase = "cmakeConfigurePhase";
|
||||||
|
|
||||||
libraryPath = lib.makeLibraryPath (
|
libraryPath = lib.makeLibraryPath (
|
||||||
[]
|
lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ]
|
||||||
++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out nvidia_x11 ]
|
|
||||||
++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd)
|
++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -55,6 +52,8 @@ buildPythonPackage rec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fixRunPath $out/lib/libgpuarray.so
|
fixRunPath $out/lib/libgpuarray.so
|
||||||
|
'' + lib.optionalString cudaSupport ''
|
||||||
|
addOpenGLRunpath $out/lib/libgpuarray.so
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -63,7 +62,12 @@ buildPythonPackage rec {
|
|||||||
Mako
|
Mako
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
] ++ lib.optionals cudaSupport [
|
||||||
|
addOpenGLRunpath
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cython
|
cython
|
||||||
|
@ -4138,7 +4138,6 @@ in {
|
|||||||
libgpuarray = callPackage ../development/python-modules/libgpuarray {
|
libgpuarray = callPackage ../development/python-modules/libgpuarray {
|
||||||
clblas = pkgs.clblas.override { boost = self.boost; };
|
clblas = pkgs.clblas.override { boost = self.boost; };
|
||||||
cudaSupport = pkgs.config.cudaSupport or false;
|
cudaSupport = pkgs.config.cudaSupport or false;
|
||||||
inherit (pkgs.linuxPackages) nvidia_x11;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
libiio = (toPythonModule (pkgs.libiio.override { inherit python; })).python;
|
libiio = (toPythonModule (pkgs.libiio.override { inherit python; })).python;
|
||||||
|
Loading…
Reference in New Issue
Block a user