firestarter: don't reference nvidia_x11 directly
It should instead be picked up at runtime from /run/opengl-driver/lib, via addOpenGLRunpath
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchzip
|
, fetchzip
|
||||||
|
, addOpenGLRunpath
|
||||||
, cmake
|
, cmake
|
||||||
, glibc_multi
|
, glibc_multi
|
||||||
, glibc
|
, glibc
|
||||||
@@ -9,7 +10,6 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
, withCuda ? false
|
, withCuda ? false
|
||||||
, linuxPackages
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -60,13 +60,23 @@ stdenv.mkDerivation rec {
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake git pkg-config ];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
git
|
||||||
|
pkg-config
|
||||||
|
] ++ lib.optionals withCuda [
|
||||||
|
addOpenGLRunpath
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ hwloc ] ++ (if withCuda then
|
buildInputs = [ hwloc ] ++ (if withCuda then
|
||||||
[ glibc_multi cudatoolkit linuxPackages.nvidia_x11 ]
|
[ glibc_multi cudatoolkit ]
|
||||||
else
|
else
|
||||||
[ glibc.static ]);
|
[ glibc.static ]);
|
||||||
|
|
||||||
|
NIX_LDFLAGS = lib.optionals withCuda [
|
||||||
|
"-L${cudatoolkit}/lib/stubs"
|
||||||
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DFIRESTARTER_BUILD_HWLOC=OFF"
|
"-DFIRESTARTER_BUILD_HWLOC=OFF"
|
||||||
"-DCMAKE_C_COMPILER_WORKS=1"
|
"-DCMAKE_C_COMPILER_WORKS=1"
|
||||||
@@ -76,8 +86,14 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp src/FIRESTARTER${lib.optionalString withCuda "_CUDA"} $out/bin/
|
cp src/FIRESTARTER${lib.optionalString withCuda "_CUDA"} $out/bin/
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = lib.optionalString withCuda ''
|
||||||
|
addOpenGLRunpath $out/bin/FIRESTARTER_CUDA
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|||||||
Reference in New Issue
Block a user