@@ -143,6 +143,27 @@ let
|
||||
hash = mobyHash;
|
||||
};
|
||||
|
||||
extraMobyPath = lib.optionals stdenv.hostPlatform.isLinux (
|
||||
lib.makeBinPath [
|
||||
iproute2
|
||||
iptables
|
||||
e2fsprogs
|
||||
xz
|
||||
xfsprogs
|
||||
procps
|
||||
util-linuxMinimal
|
||||
gitMinimal
|
||||
]
|
||||
);
|
||||
|
||||
extraMobyUserPath = lib.optionals (stdenv.hostPlatform.isLinux && !clientOnly) (
|
||||
lib.makeBinPath [
|
||||
rootlesskit
|
||||
slirp4netns
|
||||
fuse-overlayfs
|
||||
]
|
||||
);
|
||||
|
||||
moby = buildGoModule (
|
||||
lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
pname = "moby";
|
||||
@@ -170,27 +191,6 @@ let
|
||||
++ lib.optionals withSystemd [ systemd ]
|
||||
++ lib.optionals withSeccomp [ libseccomp ];
|
||||
|
||||
extraPath = lib.optionals stdenv.hostPlatform.isLinux (
|
||||
lib.makeBinPath [
|
||||
iproute2
|
||||
iptables
|
||||
e2fsprogs
|
||||
xz
|
||||
xfsprogs
|
||||
procps
|
||||
util-linuxMinimal
|
||||
gitMinimal
|
||||
]
|
||||
);
|
||||
|
||||
extraUserPath = lib.optionals (stdenv.hostPlatform.isLinux && !clientOnly) (
|
||||
lib.makeBinPath [
|
||||
rootlesskit
|
||||
slirp4netns
|
||||
fuse-overlayfs
|
||||
]
|
||||
);
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs hack/make.sh hack/make/
|
||||
''
|
||||
@@ -218,7 +218,9 @@ let
|
||||
install -Dm755 ./bundles/dynbinary-daemon/docker-proxy $out/libexec/docker/docker-proxy
|
||||
|
||||
makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
|
||||
--prefix PATH : "$out/libexec/docker:$extraPath"
|
||||
--prefix PATH : "$out/libexec/docker${
|
||||
lib.optionalString (extraMobyPath != "") ":${extraMobyPath}"
|
||||
}"
|
||||
|
||||
ln -s ${docker-containerd}/bin/containerd $out/libexec/docker/containerd
|
||||
ln -s ${docker-containerd}/bin/containerd-shim${lib.optionalString (lib.versionAtLeast version "29.0.0") "-runc-v2"} $out/libexec/docker/containerd-shim${lib.optionalString (lib.versionAtLeast version "29.0.0") "-runc-v2"}
|
||||
@@ -233,7 +235,9 @@ let
|
||||
# rootless Docker
|
||||
install -Dm755 ./contrib/dockerd-rootless.sh $out/libexec/docker/dockerd-rootless.sh
|
||||
makeWrapper $out/libexec/docker/dockerd-rootless.sh $out/bin/dockerd-rootless \
|
||||
--prefix PATH : "$out/libexec/docker:$extraPath:$extraUserPath"
|
||||
--prefix PATH : "$out/libexec/docker${
|
||||
lib.optionalString (extraMobyPath != "") ":${extraMobyPath}"
|
||||
}${lib.optionalString (extraMobyUserPath != "") ":${extraMobyUserPath}"}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@@ -335,7 +339,7 @@ let
|
||||
install -Dm755 ./build/docker $out/libexec/docker/docker
|
||||
|
||||
makeWrapper $out/libexec/docker/docker $out/bin/docker \
|
||||
--prefix PATH : "$out/libexec/docker:$extraPath" \
|
||||
--prefix PATH : "$out/libexec/docker" \
|
||||
--prefix DOCKER_CLI_PLUGIN_DIRS : "${dockerCliPluginsDirs}"
|
||||
''
|
||||
+ lib.optionalString (!clientOnly) ''
|
||||
|
||||
Reference in New Issue
Block a user