summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Vainomaa <mikroskeem@mikroskeem.eu>2021-06-06 14:32:42 +0300
committerMark Vainomaa <mikroskeem@mikroskeem.eu>2021-07-12 19:32:14 +0300
commit1553e742f522da7cc4cf7e9d79c0dc53d8da86b4 (patch)
tree00640e1de5b663dea771263c4f92d3efb49b34c1
parentff2c16095d559ed0a89a972ed93faeb3f8e24749 (diff)
downloadnixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar.gz
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar.bz2
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar.lz
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar.xz
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.tar.zst
nixpkgs-1553e742f522da7cc4cf7e9d79c0dc53d8da86b4.zip
docker: improve readability, drop unneeded substitutes
-rw-r--r--pkgs/applications/virtualization/docker/default.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index d1580331169..166b7094e96 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -77,6 +77,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
@@ -88,11 +92,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
@@ -144,6 +143,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"
@@ -162,14 +169,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 = ''