docker: improve readability, drop unneeded substitutes
(cherry picked from commit 1553e742f522da7cc4cf7e9d79c0dc53d8da86b4)
This commit is contained in:
parent
3d0968b53e
commit
405f6e41f8
|
@ -75,6 +75,10 @@ rec {
|
|||
|
||||
extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute2 iptables e2fsprogs xz xfsprogs procps util-linux git ]);
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export GOCACHE="$TMPDIR/go-cache"
|
||||
# build engine
|
||||
|
@ -86,11 +90,6 @@ rec {
|
|||
cd -
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace ./hack/make.sh --replace libsystemd-journal libsystemd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cd ./go/src/${goPackagePath}
|
||||
install -Dm755 ./bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd
|
||||
|
@ -142,6 +141,14 @@ rec {
|
|||
sqlite lvm2 btrfs-progs systemd libseccomp
|
||||
] ++ optionals (buildxSupport) [ docker-buildx ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace ./scripts/build/.variables --replace "set -eu" ""
|
||||
'' + optionalString buildxSupport ''
|
||||
substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \
|
||||
${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]}
|
||||
'';
|
||||
|
||||
# Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables
|
||||
buildPhase = ''
|
||||
export GOCACHE="$TMPDIR/go-cache"
|
||||
|
@ -160,14 +167,6 @@ rec {
|
|||
cd -
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace ./scripts/build/.variables --replace "set -eu" ""
|
||||
'' + optionalString buildxSupport ''
|
||||
substituteInPlace ./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"];
|
||||
|
||||
installPhase = ''
|
||||
|
|
Loading…
Reference in New Issue