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; };