about summary refs log tree commit diff
path: root/pkgs/tools/system/btop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/btop/default.nix')
-rw-r--r--pkgs/tools/system/btop/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix
index 47d0808c49038..b95fdc7578a22 100644
--- a/pkgs/tools/system/btop/default.nix
+++ b/pkgs/tools/system/btop/default.nix
@@ -1,4 +1,5 @@
 { lib
+, config
 , stdenv
 , fetchFromGitHub
 , cmake
@@ -6,6 +7,8 @@
 , removeReferencesTo
 , btop
 , testers
+, cudaSupport ? config.cudaSupport
+, cudaPackages
 }:
 
 stdenv.mkDerivation rec {
@@ -19,7 +22,9 @@ stdenv.mkDerivation rec {
     hash = "sha256-QQM2/LO/EHovhj+S+4x3ro/aOVrtuxteVVvYAd6feTk=";
   };
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake ] ++ lib.optionals cudaSupport [
+    cudaPackages.autoAddOpenGLRunpathHook
+  ];
 
   buildInputs = lib.optionals stdenv.isDarwin [
     darwin.apple_sdk_11_0.frameworks.CoreFoundation