btop: enable ROCm support

This commit is contained in:
Maximilian Güntner
2024-03-19 22:33:07 +01:00
committed by Bjørn Forsman
parent 422a2f092a
commit cb45d3a979
+7
View File
@@ -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;
};