From d60853e37f4b72fdf918eba645d3833c246933d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 19 Jun 2021 16:37:23 +0200 Subject: [PATCH] pythonPackages.env: make compatible with click 8 Also clean up inputs and define checkPhase. --- .../python-modules/envs/default.nix | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/envs/default.nix b/pkgs/development/python-modules/envs/default.nix index 133e99912cbd..25e6d235cff3 100644 --- a/pkgs/development/python-modules/envs/default.nix +++ b/pkgs/development/python-modules/envs/default.nix @@ -1,5 +1,12 @@ -{ lib, buildPythonPackage, fetchPypi -, mock, jinja2, click, terminaltables +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, click +, jinja2 +, terminaltables +, mock +, nose }: buildPythonPackage rec { @@ -11,7 +18,32 @@ buildPythonPackage rec { sha256 = "ccf5cd85ddb8ed335e39ed8a22e0d23658f5a6d7da430f225e6f750c6f50ae42"; }; - checkInputs = [ mock jinja2 click terminaltables ]; + patches = [ + # https://github.com/capless/envs/pull/19 + (fetchpatch { + url = "https://github.com/capless/envs/commit/6947043fa9120a7b17094fd43ee0e1edf808f42b.patch"; + sha256 = "0zswg8kp2g922mkc7x34ps37qli1d1mjwna2jfrbnsq2fg4mk818"; + }) + ]; + + propagatedBuildInputs = [ + click + jinja2 + terminaltables + ]; + + checkInputs = [ + mock + nose + ]; + + checkPhase = '' + runHook preCheck + + nosetests --with-isolation + + runHook postCheck + ''; meta = with lib; { description = "Easy access to environment variables from Python";