python312Packages.lion-pytorch: 0.2.2 -> 0.2.3 (#364581)
[NixPkgs.git] / pkgs / by-name / no / nomad-driver-containerd / package.nix
blobbf50bd1aeb62d588a59d284b348edc7d0a6c6176
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   fetchpatch,
6   containerd,
7 }:
9 buildGoModule rec {
10   pname = "nomad-driver-containerd";
11   version = "0.9.4";
13   src = fetchFromGitHub {
14     owner = "Roblox";
15     repo = pname;
16     rev = "v${version}";
17     sha256 = "sha256-11K1ACk2hhEi+sAlI932eKpyy82Md7j1edRWH2JJ8sI=";
18   };
20   # bump deps to fix CVE that isn't in a tagged release yet
21   patches = [
22     (fetchpatch {
23       url = "https://github.com/Roblox/nomad-driver-containerd/commit/80b9be1353f701b9d47d874923a9e8ffed4dbd98.patch";
24       hash = "sha256-d4C/YwemmZQAt0fTAnQkJVKn8cK4kmxB+wQEHycdn9U=";
25     })
26     (fetchpatch {
27       url = "https://github.com/Roblox/nomad-driver-containerd/commit/cc0da224669a8f85a8b695288fe5ea748fb270c2.patch";
28       hash = "sha256-W8ZOKMkv1814cPNyqTaXUGhh44WfMizZNL4cNX+FOqg=";
29     })
30   ];
32   # replace version in file as it's defined using const, and thus cannot be overriden by ldflags
33   postPatch = ''
34     substituteInPlace containerd/driver.go --replace-warn 'PluginVersion = "v0.9.3"' 'PluginVersion = "v${version}"'
35   '';
37   CGO_ENABLED = "1";
39   vendorHash = "sha256-OO+a5AqhB0tf6lyodhYl9HUSaWvtXWwevRHYy1Q6VoU=";
40   subPackages = [ "." ];
42   buildInputs = [ containerd ];
44   ldflags = [
45     "-s"
46     "-w"
47   ];
49   meta = with lib; {
50     homepage = "https://www.github.com/Roblox/nomad-driver-containerd";
51     description = "Containerd task driver for Nomad";
52     mainProgram = "nomad-driver-containerd";
53     platforms = platforms.linux;
54     license = licenses.asl20;
55     maintainers = with maintainers; [ techknowlogick ];
56   };