| How would you go about conditionally setting cudaCapabilities when instantiating nixpkgs? I.e.
Image I have this.
{
inputs = {
nixpkgs = "github:nixos/nixpkgs?ref=nixos-25.05";
};
outputs = { self, nixpkgs }: {
packages.x86_64-linux.default = let
pkgs = import nixpkgs {
overlays = [ ];
config = {
allowUnfree = true;
cudaSupport = true;
cudaCapabilities = [ "..." "..." ];
};
};
in
pkgs.hello;
packages.aarch64-linux.default = let
pkgs = import nixpkgs {
overlays = [ ];
config = {
allowUnfree = true;
cudaSupport = true;
cudaCapabilities = if isJetson then [ "..." "..." ] else [ "..." "..." ];
};
};
in
pkgs.hello;
};
}
It's the aarch64-linux part specifically that I'm a bit stuck on. I have some cloud servers that have an NVIDIA GPUs in them that run aarch64-linux, but I also have some Jetson devices that are also considered aarch64-linux.
And if I understand the whole thing correctly, I can't just set the cudaCapabilities list to include both the non-jetson and jetson capabilities, right? Or at least, than isJetsonBuild would just always eval to true even if the build was meant for the cloud server.
Probably something stupid I'm just overlooking, sorry for bothering. š
|