Skip to content

Commit

Permalink
docker: cleanup derivation of old versionOlder
Browse files Browse the repository at this point in the history
  • Loading branch information
leona-ya committed Dec 21, 2024
1 parent 7e9020d commit ba84d7f
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions pkgs/applications/virtualization/docker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,6 @@ rec {

extraUserPath = lib.optionals (stdenv.hostPlatform.isLinux && !clientOnly) (lib.makeBinPath [ rootlesskit slirp4netns fuse-overlayfs ]);

patches = lib.optionals (lib.versionOlder version "23") [
# This patch incorporates code from a PR fixing using buildkit with the ZFS graph driver.
# It could be removed when a version incorporating this patch is released.
(fetchpatch {
name = "buildkit-zfs.patch";
url = "https://github.com/moby/moby/pull/43136.patch";
hash = "sha256-1WZfpVnnqFwLMYqaHLploOodls0gHF8OCp7MrM26iX8=";
})
];

postPatch = ''
patchShebangs hack/make.sh hack/make/ hack/with-go-mod.sh
'';
Expand Down Expand Up @@ -203,7 +193,7 @@ rec {
makeWrapper pkg-config go-md2man go libtool installShellFiles
];

buildInputs = plugins ++ lib.optionals (lib.versionAtLeast version "23" && stdenv.hostPlatform.isLinux) [
buildInputs = plugins ++ lib.optionals (stdenv.hostPlatform.isLinux) [
glibc
glibc.static
];
Expand Down Expand Up @@ -231,7 +221,7 @@ rec {
'';

outputs = ["out"] ++ lib.optional (lib.versionOlder version "23") "man";
outputs = ["out"];

installPhase = ''
install -Dm755 ./build/docker $out/libexec/docker/docker
Expand All @@ -252,18 +242,6 @@ rec {
installShellCompletion --bash ./contrib/completion/bash/docker
installShellCompletion --fish ./contrib/completion/fish/docker.fish
installShellCompletion --zsh ./contrib/completion/zsh/_docker
'' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform && lib.versionOlder version "23") ''
# Generate man pages from cobra commands
echo "Generate man pages from cobra"
mkdir -p ./man/man1
go build -o ./gen-manpages github.com/docker/cli/man
./gen-manpages --root . --target ./man/man1
'' + lib.optionalString (lib.versionOlder version "23") ''
# Generate legacy pages from markdown
echo "Generate legacy manpages"
./man/md2man-all.sh -q
installManPage man/*/*.[1-9]
'';

passthru = {
Expand Down

0 comments on commit ba84d7f

Please sign in to comment.