From cb45d3a979cc41c59537c784fb89e60f4c9d40b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20G=C3=BCntner?= Date: Sat, 16 Mar 2024 18:37:21 +0100 Subject: [PATCH] btop: enable ROCm support --- pkgs/tools/system/btop/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index 5961a0fed754..ba5f01b843bb 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -9,6 +9,8 @@ , testers , cudaSupport ? config.cudaSupport , cudaPackages +, rocmSupport ? config.rocmSupport +, rocmPackages }: stdenv.mkDerivation rec { @@ -37,6 +39,11 @@ stdenv.mkDerivation rec { ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop) ''; + postPhases = lib.optionals rocmSupport [ "postPatchelf" ]; + postPatchelf = lib.optionalString rocmSupport '' + patchelf --add-rpath ${lib.getLib rocmPackages.rocm-smi}/lib $out/bin/btop + ''; + passthru.tests.version = testers.testVersion { package = btop; };