anchor.diff:      '';
   
       preFixup = ''
  -      find $out -type f -exec remove-references-to -t ${go} -t ${stdenv.cc.cc} -t ${stdenv.glibc.dev} '{}' +
  +      find $out -type f -exec remove-references-to -t ${go} -t ${stdenv.cc.cc} '{}' +
  +    '' + optionalString (stdenv.isLinux) ''
  +      find $out -type f -exec remove-references-to -t ${stdenv.glibc.dev} '{}' +
       '';
   
       meta = {
         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; [ nequissimus offline tailhook vdemeester ];
  -      platforms = platforms.linux;
  +      maintainers = with maintainers; [ nequissimus offline tailhook vdemeester periklis ];
  +      platforms = with platforms; [ linux darwin ];
       };
  -  };
  +  });
   
     # Get revisions from
     # https://github.com/docker/docker-ce/blob/v${version}/components/engine/hack/dockerfile/binaries-commits
  
positive.code: 
        # systemd
        install -Dm644 ./components/engine/contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
  
        # completion (cli)
        install -Dm644 ./components/cli/contrib/completion/bash/docker $out/share/bash-completion/completions/docker
  
negative.code: 
      # systemd 230 no longer has libsystemd-journal as a separate entity from libsystemd
      patchPhase = ''
        substituteInPlace ./components/cli/scripts/build/.variables --replace "set -eu" ""
      '' + optionalString (stdenv.isLinux) ''
        patchShebangs .
        substituteInPlace ./components/engine/hack/make.sh                   --replace libsystemd-journal libsystemd
        substituteInPlace ./components/engine/daemon/logger/journald/read.go --replace libsystemd-journal libsystemd
      '';
  
      outputs = ["out" "man"];
  
      extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux ]);
  
      installPhase = optionalString (stdenv.isLinux) ''
        if [ -d "./components/engine/bundles/${version}" ]; then
          install -Dm755 ./components/engine/bundles/${version}/dynbinary-daemon/dockerd-${version} $out/libexec/docker/dockerd
        else
          install -Dm755 ./components/engine/bundles/dynbinary-daemon/dockerd-${version} $out/libexec/docker/dockerd
        fi
  
        makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
          --prefix PATH : "$out/libexec/docker:$extraPath"
  
  