summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/ansible/2.1.nix17
-rw-r--r--pkgs/development/python-modules/ansible/2.2.nix18
-rw-r--r--pkgs/development/python-modules/docker.nix34
-rw-r--r--pkgs/development/python-modules/docker_compose.nix46
4 files changed, 109 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/ansible/2.1.nix b/pkgs/development/python-modules/ansible/2.1.nix
index 8d7598a90c91..5af0837387d4 100644
--- a/pkgs/development/python-modules/ansible/2.1.nix
+++ b/pkgs/development/python-modules/ansible/2.1.nix
@@ -13,7 +13,18 @@
 , pywinrm
 }:
 
-buildPythonPackage rec {
+let
+  jinja = jinja2.override rec {
+    pname = "Jinja2";
+    version = "2.8.1";
+    name = "${pname}-${version}";
+    src = fetchurl {
+      url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
+      sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
+    };
+  };
+
+in buildPythonPackage rec {
   pname = "ansible";
   version = "2.1.4.0";
   name = "${pname}-${version}";
@@ -34,7 +45,7 @@ buildPythonPackage rec {
   dontPatchShebangs = false;
   windowsSupport = true;
 
-  propagatedBuildInputs = [ pycrypto paramiko jinja2 pyyaml httplib2
+  propagatedBuildInputs = [ pycrypto paramiko jinja pyyaml httplib2
     boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
 
   meta = {
@@ -47,4 +58,4 @@ buildPythonPackage rec {
     ];
     platforms = with lib.platforms; linux ++ darwin;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/python-modules/ansible/2.2.nix b/pkgs/development/python-modules/ansible/2.2.nix
index 22af2c012655..48a325fec331 100644
--- a/pkgs/development/python-modules/ansible/2.2.nix
+++ b/pkgs/development/python-modules/ansible/2.2.nix
@@ -13,7 +13,19 @@
 , pywinrm
 }:
 
-buildPythonPackage rec {
+let
+  # Shouldn't be needed anymore in next version
+  # https://github.com/NixOS/nixpkgs/pull/22345#commitcomment-20718521
+  jinja = (jinja2.override rec {
+    pname = "Jinja2";
+    version = "2.8.1";
+    name = "${pname}-${version}";
+    src = fetchurl {
+      url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
+      sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
+    };
+  });
+in buildPythonPackage rec {
   pname = "ansible";
   version = "2.2.1.0";
   name = "${pname}-${version}";
@@ -34,7 +46,7 @@ buildPythonPackage rec {
   dontPatchShebangs = false;
   windowsSupport = true;
 
-  propagatedBuildInputs = [ pycrypto paramiko jinja2 pyyaml httplib2
+  propagatedBuildInputs = [ pycrypto paramiko jinja pyyaml httplib2
     boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
 
   meta = {
@@ -47,4 +59,4 @@ buildPythonPackage rec {
     ];
     platforms = with lib.platforms; linux ++ darwin;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/python-modules/docker.nix b/pkgs/development/python-modules/docker.nix
new file mode 100644
index 000000000000..12c9aac4c23d
--- /dev/null
+++ b/pkgs/development/python-modules/docker.nix
@@ -0,0 +1,34 @@
+{ stdenv, buildPythonPackage, fetchurl
+, six, requests2, websocket_client
+, ipaddress, backports_ssl_match_hostname, docker_pycreds
+}:
+buildPythonPackage rec {
+  name = "docker-${version}";
+  version = "2.0.2";
+
+  src = fetchurl {
+    url = "mirror://pypi/d/docker/${name}.tar.gz";
+    sha256 = "1m16n2r8is1gxwmyr6163na2jdyzsnhhk2qj12l7rzm1sr9nhx7z";
+  };
+
+  propagatedBuildInputs = [
+    six
+    requests2
+    websocket_client
+    ipaddress
+    backports_ssl_match_hostname
+    docker_pycreds
+  ];
+
+  # Flake8 version conflict
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "An API client for docker written in Python";
+    homepage = https://github.com/docker/docker-py;
+    license = licenses.asl20;
+    maintainers = with maintainers; [
+      jgeerds
+    ];
+  };
+}
diff --git a/pkgs/development/python-modules/docker_compose.nix b/pkgs/development/python-modules/docker_compose.nix
new file mode 100644
index 000000000000..e6f309155c22
--- /dev/null
+++ b/pkgs/development/python-modules/docker_compose.nix
@@ -0,0 +1,46 @@
+{ stdenv, buildPythonApplication, fetchurl, pythonOlder
+, mock, pytest, nose
+, pyyaml, backports_ssl_match_hostname, colorama, docopt
+, dockerpty, docker, ipaddress, jsonschema, requests2
+, six, texttable, websocket_client, cached-property
+, enum34, functools32
+}:
+buildPythonApplication rec {
+  version = "1.10.0";
+  name = "docker-compose-${version}";
+
+  src = fetchurl {
+    url = "mirror://pypi/d/docker-compose/${name}.tar.gz";
+    sha256 = "023y2yhkvglaq07d78i89g2p8h040d71il8nfbyg2f9fkffigx9z";
+  };
+
+  # lots of networking and other fails
+  doCheck = false;
+  buildInputs = [ mock pytest nose ];
+  propagatedBuildInputs = [
+    pyyaml backports_ssl_match_hostname colorama dockerpty docker
+    ipaddress jsonschema requests2 six texttable websocket_client
+    docopt cached-property
+  ] ++
+    stdenv.lib.optional (pythonOlder "3.4") enum34 ++
+    stdenv.lib.optional (pythonOlder "3.2") functools32;
+
+  patchPhase = ''
+    sed -i "s/'requests >= 2.6.1, < 2.8'/'requests'/" setup.py
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/bash-completion/completions/
+    cp contrib/completion/bash/docker-compose $out/share/bash-completion/completions/docker-compose
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://docs.docker.com/compose/";
+    description = "Multi-container orchestration for Docker";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [
+      jgeerds
+    ];
+  };
+}