docker-compose2: init at 2.0.1 (#141366)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
5d1532c5aa
commit
33bc6f8706
pkgs
26
pkgs/applications/virtualization/docker/compose.nix
Normal file
26
pkgs/applications/virtualization/docker/compose.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ lib, buildGoModule, fetchFromGitHub }:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "docker-compose";
|
||||||
|
version = "2.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "docker";
|
||||||
|
repo = "compose";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-6OjA3f6c9s/86UPxy9EqLIc/0ZuW6UhKyQdkM7YoTsU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "sha256-6h36TZmo0RvB3YzZRmsrs2Fbl+8zPTuL9LxWkuNgRqw=";
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
installPhase = ''
|
||||||
|
install -D $GOPATH/bin/cmd $out/libexec/docker/cli-plugins/docker-compose
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Docker CLI plugin to define and run multi-container applications with Docker";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = [ maintainers.babariviere ];
|
||||||
|
};
|
||||||
|
}
|
@ -8,16 +8,16 @@ rec {
|
|||||||
, moby-src
|
, moby-src
|
||||||
, runcRev, runcSha256
|
, runcRev, runcSha256
|
||||||
, containerdRev, containerdSha256
|
, containerdRev, containerdSha256
|
||||||
, tiniRev, tiniSha256, buildxSupport ? true
|
, tiniRev, tiniSha256, buildxSupport ? true, composeSupport ? true
|
||||||
# package dependencies
|
# package dependencies
|
||||||
, stdenv, fetchFromGitHub, buildGoPackage
|
, stdenv, fetchFromGitHub, buildGoPackage
|
||||||
, makeWrapper, installShellFiles, pkg-config, glibc
|
, makeWrapper, installShellFiles, pkg-config, glibc
|
||||||
, go-md2man, go, containerd_1_4, runc, docker-proxy, tini, libtool
|
, go-md2man, go, containerd_1_4, runc, docker-proxy, tini, libtool
|
||||||
, sqlite, iproute2, lvm2, systemd, docker-buildx
|
, sqlite, iproute2, lvm2, systemd, docker-buildx, docker-compose_2
|
||||||
, btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git
|
, btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git
|
||||||
, procps, libseccomp
|
, procps, libseccomp
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, clientOnly ? !stdenv.isLinux
|
, clientOnly ? !stdenv.isLinux, symlinkJoin
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
docker-runc = runc.overrideAttrs (oldAttrs: {
|
docker-runc = runc.overrideAttrs (oldAttrs: {
|
||||||
@ -117,6 +117,10 @@ rec {
|
|||||||
++ optional (lvm2 == null) "exclude_graphdriver_devicemapper"
|
++ optional (lvm2 == null) "exclude_graphdriver_devicemapper"
|
||||||
++ optional (libseccomp != null) "seccomp";
|
++ optional (libseccomp != null) "seccomp";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
plugins = optionals buildxSupport [ docker-buildx ]
|
||||||
|
++ optionals composeSupport [ docker-compose_2 ];
|
||||||
|
pluginsRef = symlinkJoin { name = "docker-plugins"; paths = plugins; };
|
||||||
in
|
in
|
||||||
buildGoPackage ((optionalAttrs (!clientOnly) {
|
buildGoPackage ((optionalAttrs (!clientOnly) {
|
||||||
|
|
||||||
@ -141,14 +145,14 @@ rec {
|
|||||||
];
|
];
|
||||||
buildInputs = optionals (!clientOnly) [
|
buildInputs = optionals (!clientOnly) [
|
||||||
sqlite lvm2 btrfs-progs systemd libseccomp
|
sqlite lvm2 btrfs-progs systemd libseccomp
|
||||||
] ++ optionals (buildxSupport) [ docker-buildx ];
|
] ++ plugins;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs man scripts/build/
|
patchShebangs man scripts/build/
|
||||||
substituteInPlace ./scripts/build/.variables --replace "set -eu" ""
|
substituteInPlace ./scripts/build/.variables --replace "set -eu" ""
|
||||||
'' + optionalString buildxSupport ''
|
'' + optionalString (plugins != []) ''
|
||||||
substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \
|
substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \
|
||||||
${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]}
|
"${pluginsRef}/libexec/docker/cli-plugins"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables
|
# Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables
|
||||||
|
@ -24191,6 +24191,7 @@ with pkgs;
|
|||||||
afterburn = callPackage ../tools/admin/afterburn {};
|
afterburn = callPackage ../tools/admin/afterburn {};
|
||||||
|
|
||||||
docker-buildx = callPackage ../applications/virtualization/docker/buildx.nix { };
|
docker-buildx = callPackage ../applications/virtualization/docker/buildx.nix { };
|
||||||
|
docker-compose_2 = callPackage ../applications/virtualization/docker/compose.nix { };
|
||||||
|
|
||||||
amazon-ecr-credential-helper = callPackage ../tools/admin/amazon-ecr-credential-helper { };
|
amazon-ecr-credential-helper = callPackage ../tools/admin/amazon-ecr-credential-helper { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user