blob: a5fe4e5fea03fff1c247fc5b33ec091de38dd45b (
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
|
# The _cuda attribute set is a fixed-point which contains the static functionality required to construct CUDA package
# sets. For example, `_cuda.bootstrapData` includes information about NVIDIA's redistributables (such as the names
# NVIDIA uses for different systems), and `_cuda.lib` contains utility functions like `formatCapabilities` (which generate
# common arguments passed to NVCC and `cmakeFlags`).
#
# Since this attribute set is used to construct the CUDA package sets, it must exist outside the fixed point of the
# package sets. Make these attributes available directly in the package set construction could cause confusion if
# users override the attribute set with the expectation that changes will be reflected in the enclosing CUDA package
# set. To avoid this, we declare `_cuda` and inherit its members here, at top-level. (This also allows us to benefit
# from import caching, as it should be evaluated once per system, rather than per-system and CUDA package set.)
let
lib = import ../../../../lib;
in
lib.fixedPoints.makeExtensible (final: {
bootstrapData = import ./db/bootstrap {
inherit lib;
};
db = import ./db {
inherit (final) bootstrapData db;
inherit lib;
};
extensions = [ ]; # Extensions applied to every CUDA package set.
manifests = import ./manifests { inherit lib; };
lib = import ./lib {
_cuda = final;
inherit lib;
};
})
|