summaryrefslogtreecommitdiffstats
path: root/pkgs/development/cuda-modules/packages/libcudla.nix
blob: 10c81dfbbb4062ac4f580ebdecd2480697eaa6cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  backendStdenv,
  buildRedist,
  cudaOlder,
  lib,
}:
buildRedist {
  redistName = "cuda";
  pname = "libcudla";

  outputs = [
    "out"
    "dev"
    "include"
    "lib"
    "stubs"
  ];

  autoPatchelfIgnoreMissingDeps = [
    "libnvcudla.so"
  ]
  ++ lib.optionals (cudaOlder "12") [
    "libcuda.so.1"
    "libnvdla_runtime.so"
  ];

  platformAssertions = [
    {
      message = "Only Xavier (7.2) and Orin (8.7) Jetson devices are supported";
      assertion = lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ];
    }
  ];
}