From 3d25f046b39158959e64444da2483ea2b30aad3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Ma=C5=84ko?= Date: Wed, 9 Mar 2022 17:26:50 +0100 Subject: [PATCH] docker: add a patch to fix Docker buildkit when using ZFS graph driver. The patch incorporates changes merged into the upstream in this PR: https://github.com/moby/moby/pull/43136 --- pkgs/applications/virtualization/docker/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index c479542f7715..87bb16ab8339 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -10,7 +10,7 @@ rec { , containerdRev, containerdSha256 , tiniRev, tiniSha256, buildxSupport ? true, composeSupport ? true # package dependencies - , stdenv, fetchFromGitHub, buildGoPackage + , stdenv, fetchFromGitHub, fetchpatch, buildGoPackage , makeWrapper, installShellFiles, pkg-config, glibc , go-md2man, go, containerd, runc, docker-proxy, tini, libtool , sqlite, iproute2, lvm2, systemd, docker-buildx, docker-compose_2 @@ -79,6 +79,16 @@ rec { extraUserPath = optionals (stdenv.isLinux && !clientOnly) (makeBinPath [ rootlesskit slirp4netns fuse-overlayfs ]); + patches = [ + # This patch incorporates code from a PR fixing using buildkit with the ZFS graph driver. + # It could be removed when a version incorporating this patch is released. + (fetchpatch { + name = "buildkit-zfs.patch"; + url = "https://github.com/moby/moby/pull/43136.patch"; + sha256 = "1WZfpVnnqFwLMYqaHLploOodls0gHF8OCp7MrM26iX8="; + }) + ]; + postPatch = '' patchShebangs hack/make.sh hack/make/ '';