-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlay.nix
29 lines (27 loc) · 857 Bytes
/
overlay.nix
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
{
config,
pkgs,
lib,
...
}:
{
nixpkgs.overlays = [
# https://github.com/NixOS/nixpkgs/issues/351717
(final: prev: {
python312 = prev.python312.override {
packageOverrides = final: prevPy: {
triton-bin = prevPy.triton-bin.overridePythonAttrs (oldAttrs: {
postFixup = ''
chmod +x "$out/${prev.python312.sitePackages}/triton/backends/nvidia/bin/ptxas"
substituteInPlace $out/${prev.python312.sitePackages}/triton/backends/nvidia/driver.py \
--replace \
'return [libdevice_dir, *libcuda_dirs()]' \
'return [libdevice_dir, "${prev.addDriverRunpath.driverLink}/lib", "${prev.cudaPackages.cuda_cudart}/lib/stubs/"]'
'';
});
};
};
python312Packages = final.python312.pkgs;
})
];
}