From 2438ceb5b486c071a94bde7542847de33634abb3 Mon Sep 17 00:00:00 2001 From: Maximilian Bode Date: Sat, 15 Sep 2018 10:09:36 +0200 Subject: [PATCH] salt: fix darwin build by specifying dependency on tornado 4 /cc ZHF #45961 --- .../python-modules/tornado/default.nix | 20 +++++++++++++++---- pkgs/tools/admin/salt/default.nix | 2 +- pkgs/top-level/python-packages.nix | 1 + 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/tornado/default.nix b/pkgs/development/python-modules/tornado/default.nix index 6d86404e1925..d446d377e66f 100644 --- a/pkgs/development/python-modules/tornado/default.nix +++ b/pkgs/development/python-modules/tornado/default.nix @@ -8,12 +8,25 @@ , singledispatch , pythonOlder , futures +, version ? "5.1" }: +let + versionMap = { + "4.5.3" = { + sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d"; + }; + "5.1" = { + sha256 = "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582"; + }; + }; +in + +with versionMap.${version}; + buildPythonPackage rec { pname = "tornado"; - version = "5.1"; - + inherit version; propagatedBuildInputs = [ backports_abc certifi singledispatch ] ++ lib.optional (pythonOlder "3.5") backports_ssl_match_hostname @@ -26,8 +39,7 @@ buildPythonPackage rec { ''; src = fetchPypi { - inherit pname version; - sha256 = "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582"; + inherit pname sha256 version; }; meta = { diff --git a/pkgs/tools/admin/salt/default.nix b/pkgs/tools/admin/salt/default.nix index 80df9148220c..6cf997cd738c 100644 --- a/pkgs/tools/admin/salt/default.nix +++ b/pkgs/tools/admin/salt/default.nix @@ -23,7 +23,7 @@ pythonPackages.buildPythonApplication rec { pyyaml pyzmq requests - tornado + tornado_4 ] ++ stdenv.lib.optional (!pythonPackages.isPy3k) [ futures ] ++ extraInputs; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4375ab550fde..c4e46ea8889a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14901,6 +14901,7 @@ EOF }; tornado = callPackage ../development/python-modules/tornado { }; + tornado_4 = callPackage ../development/python-modules/tornado { version = "4.5.3"; }; tokenlib = buildPythonPackage rec { name = "tokenlib-${version}";