Skip to content

Commit b80d043

Browse files
committed
nvtopPackages.apple: darwin support
1 parent 8ebe7db commit b80d043

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pkgs/tools/system/nvtop/build-nvtop.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
, ncurses
99
, testers
1010
, udev
11+
, apple-sdk_12
1112
, addDriverRunpath
1213
, amd ? false
1314
, intel ? false
@@ -53,7 +54,9 @@ stdenv.mkDerivation (finalAttrs: {
5354
];
5455
nativeBuildInputs = [ cmake gtest ] ++ lib.optional nvidia addDriverRunpath;
5556

56-
buildInputs = [ ncurses udev ]
57+
buildInputs = [ ncurses ]
58+
++ lib.optional stdenv.isLinux udev
59+
++ lib.optional stdenv.isDarwin apple-sdk_12
5760
++ lib.optional nvidia cudatoolkit
5861
++ lib.optional needDrm libdrm
5962
;
@@ -83,8 +86,8 @@ stdenv.mkDerivation (finalAttrs: {
8386
homepage = "https://github.com/Syllo/nvtop";
8487
changelog = "https://github.com/Syllo/nvtop/releases/tag/${finalAttrs.version}";
8588
license = licenses.gpl3Only;
86-
platforms = platforms.linux;
87-
maintainers = with maintainers; [ willibutz gbtb anthonyroussel ];
89+
platforms = platforms.linux ++ platforms.darwin;
90+
maintainers = with maintainers; [ willibutz gbtb anthonyroussel moni ];
8891
mainProgram = "nvtop";
8992
};
9093
})

pkgs/tools/system/nvtop/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
let
33
# this GPU families are supported "by-default" upstream (see https://github.com/Syllo/nvtop/blob/3a69c2d060298cd6f92cb09db944eded98be1c23/CMakeLists.txt#L81)
44
# coincidentally, these families are also easy to build in nixpkgs at the moment
5-
defaultGPUFamilies = [ "amd" "intel" "msm" "nvidia" "panfrost" "panthor" ];
5+
defaultGPUFamilies = [ "amd" "apple" "intel" "msm" "nvidia" "panfrost" "panthor" ];
66
# these GPU families are partially supported upstream, they are also tricky to build in nixpkgs
77
# volunteers with specific hardware needed to build and test these package variants
8-
additionalGPUFamilies = [ "apple" "ascend" ];
8+
additionalGPUFamilies = [ "ascend" ];
99
defaultSupport = builtins.listToAttrs (builtins.map (gpu: { name = gpu; value = true; }) defaultGPUFamilies);
1010
in
1111
{

0 commit comments

Comments
 (0)