13 cudaSupport ? config.cudaSupport,
14 rocmSupport ? config.rocmSupport,
17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
22 owner = "aristocratos";
25 hash = "sha256-A5hOBxj8tKlkHd8zDHfDoU6fIu8gDpt3/usbiDk0/G0=";
32 ++ lib.optionals cudaSupport [
36 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
38 (darwinMinVersionHook "10.15")
41 installFlags = [ "PREFIX=$(out)" ];
44 ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop)
47 postPhases = lib.optionals rocmSupport [ "postPatchelf" ];
48 postPatchelf = lib.optionalString rocmSupport ''
49 patchelf --add-rpath ${lib.getLib rocmPackages.rocm-smi}/lib $out/bin/btop
52 nativeInstallCheckInputs = [ versionCheckHook ];
53 versionCheckProgramArg = "--version";
54 doInstallCheck = true;
57 description = "Monitor of resources";
58 homepage = "https://github.com/aristocratos/btop";
59 changelog = "https://github.com/aristocratos/btop/blob/v${version}/CHANGELOG.md";
60 license = licenses.asl20;
61 platforms = platforms.linux ++ platforms.darwin;
62 maintainers = with maintainers; [