diff --git a/pkgs/applications/virtualization/containerd/1.4.nix b/pkgs/applications/virtualization/containerd/1.4.nix new file mode 100644 index 00000000000000..e4f743013b2717 --- /dev/null +++ b/pkgs/applications/virtualization/containerd/1.4.nix @@ -0,0 +1,53 @@ +{ lib +, fetchFromGitHub +, buildGoPackage +, btrfs-progs +, go-md2man +, installShellFiles +, util-linux +, nixosTests +}: + +buildGoPackage rec { + pname = "containerd"; + version = "1.4.9"; + + src = fetchFromGitHub { + owner = "containerd"; + repo = "containerd"; + rev = "v${version}"; + sha256 = "1ykikks6ihgg899ibk9m9m0hqrbss0cx7l7z4yjb873b10bacj52"; + }; + + goPackagePath = "github.com/containerd/containerd"; + outputs = [ "out" "man" ]; + + nativeBuildInputs = [ go-md2man installShellFiles util-linux ]; + + buildInputs = [ btrfs-progs ]; + + buildFlags = [ "VERSION=v${version}" "REVISION=${src.rev}" ]; + + buildPhase = '' + cd go/src/${goPackagePath} + patchShebangs . + make binaries man $buildFlags + ''; + + installPhase = '' + install -Dm555 bin/* -t $out/bin + installManPage man/*.[1-9] + installShellCompletion --bash contrib/autocomplete/ctr + installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete + ''; + + passthru.tests = { inherit (nixosTests) docker; }; + + meta = with lib; { + homepage = "https://containerd.io/"; + description = "A daemon to control runC"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 64684ffc0a288b..a1821aa2a316e9 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -12,7 +12,7 @@ rec { # package dependencies , stdenv, fetchFromGitHub, buildGoPackage , makeWrapper, installShellFiles, pkg-config, glibc - , go-md2man, go, containerd, runc, docker-proxy, tini, libtool + , go-md2man, go, containerd_1_4, runc, docker-proxy, tini, libtool , sqlite, iproute2, lvm2, systemd, docker-buildx , btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, libseccomp @@ -33,7 +33,7 @@ rec { patches = []; }); - docker-containerd = containerd.overrideAttrs (oldAttrs: { + docker-containerd = containerd_1_4.overrideAttrs (oldAttrs: { name = "docker-containerd-${version}"; inherit version; src = fetchFromGitHub { @@ -210,7 +210,7 @@ rec { homepage = "https://www.docker.com/"; description = "An open source project to pack, ship and run any application as a lightweight container"; license = licenses.asl20; - maintainers = with maintainers; [ offline tailhook vdemeester periklis mikroskeem ]; + maintainers = with maintainers; [ offline tailhook vdemeester periklis mikroskeem maxeaubrey ]; platforms = with platforms; linux ++ darwin; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7766eb1f26fef..1bed1faeff3f61 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23671,6 +23671,7 @@ in comical = callPackage ../applications/graphics/comical { }; containerd = callPackage ../applications/virtualization/containerd { }; + containerd_1_4 = callPackage ../applications/virtualization/containerd/1.4.nix { }; convchain = callPackage ../tools/graphics/convchain {};