docker: fix build on darwin

The directory change to `./go/src/${goPackagePath}` was only executed on
Linux.
This commit is contained in:
Mario Rodas 2020-08-28 00:00:00 +00:00
parent 3c95f06e1b
commit 7201fac2e7
No known key found for this signature in database
GPG Key ID: 325649BCA6D53027

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