Commit 84e9fd9d authored by moni's avatar moni
Browse files

nvtopPackages.full: mutually exclude gpus for darwin and linux

parent b80d0435
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
{ callPackage }:
{ callPackage, stdenv }:
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
@@ -6,13 +6,14 @@ let
  # 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 = [ "ascend" ];
  defaultSupport = builtins.listToAttrs (builtins.map (gpu: { name = gpu; value = true; }) defaultGPUFamilies);
  defaultSupport = builtins.listToAttrs (
    # apple can only build on darwin, and it can't build everything else, and vice versa
      builtins.map (gpu: { name = gpu; value = (gpu == "apple" && stdenv.buildPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform) || (gpu != "apple" && stdenv.buildPlatform.isLinux);
    }) defaultGPUFamilies
  );
in
{
  full = callPackage ./build-nvtop.nix defaultSupport; #this package supports all default GPU families
}
# additional packages with only one specific GPU family support
// builtins.listToAttrs (builtins.map (gpu: { name = gpu; value = (callPackage ./build-nvtop.nix { "${gpu}" = true; }); }) defaultGPUFamilies)


+1 −1
Original line number Diff line number Diff line
@@ -10541,7 +10541,7 @@ with pkgs;
  nvidia-system-monitor-qt = libsForQt5.callPackage ../tools/system/nvidia-system-monitor-qt { };
  nvtopPackages = recurseIntoAttrs (import ../tools/system/nvtop { inherit callPackage; });
  nvtopPackages = recurseIntoAttrs (import ../tools/system/nvtop { inherit callPackage stdenv; });
  inherit (callPackages ../development/libraries/ogre { })
    ogre_13 ogre_14;