diff options
author | Ivan Babrou <github@ivan.computer> | 2020-12-22 14:53:53 -0800 |
---|---|---|
committer | Ivan Babrou <github@ivan.computer> | 2021-01-21 12:52:46 -0800 |
commit | deb0d298a255184712e4af368c78300d1be9dc70 (patch) | |
tree | c5952303da2252c8c89f482016dc2fff4ccecec8 | |
parent | e431ff7e2efc2fea43f43b0fbe53b9cbe2cd6a86 (diff) |
docker: add buildx support to docker client
-rw-r--r-- | pkgs/applications/virtualization/docker/default.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 8e75bf46f497..28075360f694 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -1,10 +1,11 @@ { stdenv, lib, fetchFromGitHub, fetchpatch, buildGoPackage , makeWrapper, installShellFiles, pkg-config , go-md2man, go, containerd, runc, docker-proxy, tini, libtool -, sqlite, iproute, lvm2, systemd +, sqlite, iproute, lvm2, systemd, docker-buildx , btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, libseccomp , nixosTests +, buildxSupport ? false }: with lib; @@ -15,7 +16,7 @@ rec { , mobyRev, mobySha256 , runcRev, runcSha256 , containerdRev, containerdSha256 - , tiniRev, tiniSha256 + , tiniRev, tiniSha256, buildxSupport } : let docker-runc = runc.overrideAttrs (oldAttrs: { @@ -142,7 +143,7 @@ rec { makeWrapper ] ++ optionals (stdenv.isLinux) [ sqlite lvm2 btrfs-progs systemd libseccomp - ]; + ] ++ optionals (buildxSupport) [ docker-buildx ]; # Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables buildPhase = '' @@ -167,6 +168,9 @@ rec { substituteInPlace ./scripts/build/.variables --replace "set -eu" "" substituteInPlace ./scripts/docs/generate-man.sh --replace "-v md2man" "-v go-md2man" substituteInPlace ./man/md2man-all.sh --replace md2man go-md2man + '' + optionalString buildxSupport '' + substituteInPlace ./components/cli/cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \ + ${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]} ''; outputs = ["out" "man"]; @@ -224,5 +228,6 @@ rec { containerdSha256 = "09xvhjg5f8h90w1y94kqqnqzhbhd62dcdd9wb9sdqakisjk6zrl0"; tiniRev = "de40ad007797e0dcd8b7126f27bb87401d224240"; # v0.19.0 tiniSha256 = "1h20i3wwlbd8x4jr2gz68hgklh0lb0jj7y5xk1wvr8y58fip1rdn"; + inherit buildxSupport; }; } |