diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-06-04 12:13:44 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-06-06 14:58:18 +1000 |
commit | b7b91880d3f2358a5eacb31476ab937c0df5562a (patch) | |
tree | 4e6b3cd4b373ac359cac87456b69fe5d553cf6b7 /pkgs/applications/virtualization/docker | |
parent | d8cdbde2c94345441235bad1d473b01ec14ca011 (diff) |
docker-compose: default to v2
Diffstat (limited to 'pkgs/applications/virtualization/docker')
-rw-r--r-- | pkgs/applications/virtualization/docker/compose_1.nix | 48 | ||||
-rw-r--r-- | pkgs/applications/virtualization/docker/default.nix | 4 |
2 files changed, 50 insertions, 2 deletions
diff --git a/pkgs/applications/virtualization/docker/compose_1.nix b/pkgs/applications/virtualization/docker/compose_1.nix new file mode 100644 index 000000000000..1299d6f69ec7 --- /dev/null +++ b/pkgs/applications/virtualization/docker/compose_1.nix @@ -0,0 +1,48 @@ +{ lib, buildPythonApplication, fetchPypi, pythonOlder +, installShellFiles +, mock, pytest, nose +, pyyaml, backports_ssl_match_hostname, colorama, docopt +, dockerpty, docker, jsonschema, requests +, six, texttable, websocket-client, cached-property +, enum34, functools32, paramiko, distro, python-dotenv +}: + +buildPythonApplication rec { + version = "1.29.2"; + pname = "docker-compose"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-TIzZ0h0jdBJ5PRi9MxEASe6a+Nqz/iwhO70HM5WbCbc="; + }; + + # lots of networking and other fails + doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + checkInputs = [ mock pytest nose ]; + propagatedBuildInputs = [ + pyyaml colorama dockerpty docker + jsonschema requests six texttable websocket-client + docopt cached-property paramiko distro python-dotenv + ] ++ lib.optional (pythonOlder "3.7") backports_ssl_match_hostname + ++ lib.optional (pythonOlder "3.4") enum34 + ++ lib.optional (pythonOlder "3.2") functools32; + + postPatch = '' + # Remove upper bound on requires, see also + # https://github.com/docker/compose/issues/4431 + sed -i "s/, < .*',$/',/" setup.py + ''; + + postInstall = '' + installShellCompletion --bash contrib/completion/bash/docker-compose + installShellCompletion --zsh contrib/completion/zsh/_docker-compose + ''; + + meta = with lib; { + homepage = "https://docs.docker.com/compose/"; + description = "Multi-container orchestration for Docker"; + license = licenses.asl20; + maintainers = with maintainers; [ Frostman ]; + }; +} diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 68f1ff45d144..ea73e6a7096f 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -13,7 +13,7 @@ rec { , stdenv, fetchFromGitHub, fetchpatch, buildGoPackage , makeWrapper, installShellFiles, pkg-config, glibc , go-md2man, go, containerd, runc, docker-proxy, tini, libtool - , sqlite, iproute2, lvm2, systemd, docker-buildx, docker-compose_2 + , sqlite, iproute2, lvm2, systemd, docker-buildx, docker-compose , btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, libseccomp, rootlesskit, slirp4netns, fuse-overlayfs , nixosTests @@ -136,7 +136,7 @@ rec { }); plugins = optionals buildxSupport [ docker-buildx ] - ++ optionals composeSupport [ docker-compose_2 ]; + ++ optionals composeSupport [ docker-compose ]; pluginsRef = symlinkJoin { name = "docker-plugins"; paths = plugins; }; in buildGoPackage ((optionalAttrs (!clientOnly) { |