|
1 |
| -{ fetchFromGitLab, buildGoModule, fetchpatch }: |
| 1 | +{ buildGoModule, fetchFromGitHub, fetchpatch }: |
2 | 2 |
|
3 | 3 | buildGoModule rec {
|
4 | 4 | pname = "nvidia-ctk";
|
5 |
| - version = "unstable-${builtins.substring 0 7 src.rev}"; |
| 5 | + version = "1.15.0-rc.4"; |
6 | 6 |
|
7 | 7 | # TODO(jared): pin to v1.15.0 once it is released
|
8 | 8 | # We currently rely on some features in an unreleased version of nvidia
|
9 | 9 | # container toolkit.
|
10 |
| - src = fetchFromGitLab { |
| 10 | + src = fetchFromGitHub { |
11 | 11 | owner = "nvidia";
|
12 |
| - repo = "container-toolkit/container-toolkit"; |
13 |
| - rev = "a2262d00cc6d98ac2e95ae2f439e699a7d64dc17"; |
14 |
| - hash = "sha256-Oi04PIES0qTih/EiFBStIoBadM3H52+81KEfUumQcIs="; |
| 12 | + repo = "nvidia-container-toolkit"; |
| 13 | + rev = "v${version}"; |
| 14 | + hash = "sha256-Ky0mGothIq5BOAHc4ujrMrh1niBYUoSgaRnv30ymjsE="; |
15 | 15 | };
|
16 | 16 |
|
17 | 17 | patches = [
|
18 | 18 | # ensure nvidia-ctk can build with Go versions less than 1.20 (currently
|
19 | 19 | # required on their latest release)
|
20 | 20 | (fetchpatch {
|
21 |
| - name = "Fix-double-error-wrap-fmt"; |
22 |
| - url = "https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/commit/80756d00a6b75761103c50f605cece5fa7e39392.patch"; |
23 |
| - hash = "sha256-hoeMUUPWKToCR7V/JG26wF6SCoHQwQORcGimH6EXDJ8="; |
24 |
| - }) |
25 |
| - (fetchpatch { |
26 |
| - name = "Use-golang-1.17"; |
27 |
| - url = "https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/commit/5956b04096d1a92b241b13cc1f3e208f8b99eea0.patch"; |
28 |
| - hash = "sha256-VB3+ijc2Pdlm1W2LqvCjx9KDYKinWBkr/eiUJEwig/o="; |
| 21 | + name = "Add-errors-Join-wrapper"; |
| 22 | + url = "https://github.com/NVIDIA/nvidia-container-toolkit/commit/92f17e94939bf8c213419749f5f7b48d2f0e618c.patch"; |
| 23 | + hash = "sha256-ioWstYky7LbIGtlfMMlbhIVN8yH7Qgp3z4wrkytT3TY="; |
29 | 24 | })
|
30 | 25 | (fetchpatch {
|
31 |
| - name = "Draft-Compat-with-golang-1.17"; |
32 |
| - url = "https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/commit/86f68a49014a4cffb7dcb51f14a02f6f1816b2ee.patch"; |
33 |
| - hash = "sha256-ioWstYky7LbIGtlfMMlbhIVN8yH7Qgp3z4wrkytT3TY="; |
| 26 | + name = "Fix-double-error-wrap-fmt"; |
| 27 | + url = "https://github.com/NVIDIA/nvidia-container-toolkit/commit/f23fd2ce38ee3a9e87ac41c265b637cf97990ac7.patch"; |
| 28 | + hash = "sha256-hoeMUUPWKToCR7V/JG26wF6SCoHQwQORcGimH6EXDJ8="; |
34 | 29 | })
|
35 |
| - # ensure nvidia-ctk can find ldconfig |
36 |
| - ./nixos-ldconfig.patch |
37 | 30 | ];
|
38 | 31 |
|
39 | 32 | subPackages = [ "cmd/nvidia-ctk" ];
|
40 | 33 |
|
41 | 34 | vendorHash = null;
|
42 | 35 |
|
43 | 36 | ldflags = [ "-s" "-w" "-extldflags=-Wl,-z,lazy" ];
|
| 37 | + |
| 38 | + meta.mainProgram = "nvidia-ctk"; |
44 | 39 | }
|
0 commit comments