Commit b80d0435 authored by moni's avatar moni
Browse files

nvtopPackages.apple: darwin support

parent 8ebe7dbb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
, ncurses
, testers
, udev
, apple-sdk_12
, addDriverRunpath
, amd ? false
, intel ? false
@@ -53,7 +54,9 @@ stdenv.mkDerivation (finalAttrs: {
  ];
  nativeBuildInputs = [ cmake gtest ] ++ lib.optional nvidia addDriverRunpath;

  buildInputs = [ ncurses udev ]
  buildInputs = [ ncurses ]
    ++ lib.optional stdenv.isLinux udev
    ++ lib.optional stdenv.isDarwin apple-sdk_12
    ++ lib.optional nvidia cudatoolkit
    ++ lib.optional needDrm libdrm
  ;
@@ -83,8 +86,8 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://github.com/Syllo/nvtop";
    changelog = "https://github.com/Syllo/nvtop/releases/tag/${finalAttrs.version}";
    license = licenses.gpl3Only;
    platforms = platforms.linux;
    maintainers = with maintainers; [ willibutz gbtb anthonyroussel ];
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ willibutz gbtb anthonyroussel moni ];
    mainProgram = "nvtop";
  };
})
+2 −2
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@
let
  # this GPU families are supported "by-default" upstream (see https://github.com/Syllo/nvtop/blob/3a69c2d060298cd6f92cb09db944eded98be1c23/CMakeLists.txt#L81)
  # coincidentally, these families are also easy to build in nixpkgs at the moment
  defaultGPUFamilies = [ "amd" "intel" "msm" "nvidia" "panfrost" "panthor" ];
  defaultGPUFamilies = [ "amd" "apple" "intel" "msm" "nvidia" "panfrost" "panthor" ];
  # these GPU families are partially supported upstream, they are also tricky to build in nixpkgs
  # volunteers with specific hardware needed to build and test these package variants
  additionalGPUFamilies = [ "apple" "ascend" ];
  additionalGPUFamilies = [ "ascend" ];
  defaultSupport = builtins.listToAttrs (builtins.map (gpu: { name = gpu; value = true; }) defaultGPUFamilies);
in
{