Merge pull request #96521 from marsam/fix-docker-darwin

docker: fix build on darwin
This commit is contained in:
Mario Rodas 2020-08-28 23:05:56 -05:00 committed by GitHub
commit 0c447a3bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,8 +136,13 @@ rec {
extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux git ]); extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux git ]);
installPhase = optionalString (stdenv.isLinux) '' installPhase = ''
cd ./go/src/${goPackagePath} cd ./go/src/${goPackagePath}
install -Dm755 ./components/cli/docker $out/libexec/docker/docker
makeWrapper $out/libexec/docker/docker $out/bin/docker \
--prefix PATH : "$out/libexec/docker:$extraPath"
'' + optionalString (stdenv.isLinux) ''
install -Dm755 ./components/engine/bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd install -Dm755 ./components/engine/bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd
makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \ makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
@ -153,11 +158,6 @@ rec {
# systemd # systemd
install -Dm644 ./components/engine/contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service install -Dm644 ./components/engine/contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
'' + '' '' + ''
install -Dm755 ./components/cli/docker $out/libexec/docker/docker
makeWrapper $out/libexec/docker/docker $out/bin/docker \
--prefix PATH : "$out/libexec/docker:$extraPath"
# completion (cli) # completion (cli)
installShellCompletion --bash ./components/cli/contrib/completion/bash/docker installShellCompletion --bash ./components/cli/contrib/completion/bash/docker
installShellCompletion --fish ./components/cli/contrib/completion/fish/docker.fish installShellCompletion --fish ./components/cli/contrib/completion/fish/docker.fish