docker-compose2: init at 2.0.1 (#141366)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

Bastien Rivière
Sandro
and committed by
GitHub
33bc6f87 5d1532c5

+37 -6
+26
pkgs/applications/virtualization/docker/compose.nix
··· 1 + { lib, buildGoModule, fetchFromGitHub }: 2 + 3 + buildGoModule rec { 4 + pname = "docker-compose"; 5 + version = "2.0.1"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "docker"; 9 + repo = "compose"; 10 + rev = "v${version}"; 11 + sha256 = "sha256-6OjA3f6c9s/86UPxy9EqLIc/0ZuW6UhKyQdkM7YoTsU="; 12 + }; 13 + 14 + vendorSha256 = "sha256-6h36TZmo0RvB3YzZRmsrs2Fbl+8zPTuL9LxWkuNgRqw="; 15 + 16 + doCheck = false; 17 + installPhase = '' 18 + install -D $GOPATH/bin/cmd $out/libexec/docker/cli-plugins/docker-compose 19 + ''; 20 + 21 + meta = with lib; { 22 + description = "Docker CLI plugin to define and run multi-container applications with Docker"; 23 + license = licenses.asl20; 24 + maintainers = [ maintainers.babariviere ]; 25 + }; 26 + }
+10 -6
pkgs/applications/virtualization/docker/default.nix
··· 8 8 , moby-src 9 9 , runcRev, runcSha256 10 10 , containerdRev, containerdSha256 11 - , tiniRev, tiniSha256, buildxSupport ? true 11 + , tiniRev, tiniSha256, buildxSupport ? true, composeSupport ? true 12 12 # package dependencies 13 13 , stdenv, fetchFromGitHub, buildGoPackage 14 14 , makeWrapper, installShellFiles, pkg-config, glibc 15 15 , go-md2man, go, containerd_1_4, runc, docker-proxy, tini, libtool 16 - , sqlite, iproute2, lvm2, systemd, docker-buildx 16 + , sqlite, iproute2, lvm2, systemd, docker-buildx, docker-compose_2 17 17 , btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git 18 18 , procps, libseccomp 19 19 , nixosTests 20 - , clientOnly ? !stdenv.isLinux 20 + , clientOnly ? !stdenv.isLinux, symlinkJoin 21 21 }: 22 22 let 23 23 docker-runc = runc.overrideAttrs (oldAttrs: { ··· 117 117 ++ optional (lvm2 == null) "exclude_graphdriver_devicemapper" 118 118 ++ optional (libseccomp != null) "seccomp"; 119 119 }); 120 + 121 + plugins = optionals buildxSupport [ docker-buildx ] 122 + ++ optionals composeSupport [ docker-compose_2 ]; 123 + pluginsRef = symlinkJoin { name = "docker-plugins"; paths = plugins; }; 120 124 in 121 125 buildGoPackage ((optionalAttrs (!clientOnly) { 122 126 ··· 141 145 ]; 142 146 buildInputs = optionals (!clientOnly) [ 143 147 sqlite lvm2 btrfs-progs systemd libseccomp 144 - ] ++ optionals (buildxSupport) [ docker-buildx ]; 148 + ] ++ plugins; 145 149 146 150 postPatch = '' 147 151 patchShebangs man scripts/build/ 148 152 substituteInPlace ./scripts/build/.variables --replace "set -eu" "" 149 - '' + optionalString buildxSupport '' 153 + '' + optionalString (plugins != []) '' 150 154 substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \ 151 - ${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]} 155 + "${pluginsRef}/libexec/docker/cli-plugins" 152 156 ''; 153 157 154 158 # Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables
+1
pkgs/top-level/all-packages.nix
··· 24191 24191 afterburn = callPackage ../tools/admin/afterburn {}; 24192 24192 24193 24193 docker-buildx = callPackage ../applications/virtualization/docker/buildx.nix { }; 24194 + docker-compose_2 = callPackage ../applications/virtualization/docker/compose.nix { }; 24194 24195 24195 24196 amazon-ecr-credential-helper = callPackage ../tools/admin/amazon-ecr-credential-helper { }; 24196 24197