From e1e71e5886576a5054fecb47d21b0515aff08367 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 23 Feb 2020 12:38:55 -0800 Subject: [PATCH] pythonPackages.ansible-lint: disable for python2 raumel.yaml is not importable, which makes pip fail during installation --- pkgs/development/python-modules/ansible-lint/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ansible-lint/default.nix b/pkgs/development/python-modules/ansible-lint/default.nix index a8a7fc3a7bff..b704fd7453fe 100644 --- a/pkgs/development/python-modules/ansible-lint/default.nix +++ b/pkgs/development/python-modules/ansible-lint/default.nix @@ -1,17 +1,21 @@ { lib , fetchPypi , buildPythonPackage +, isPy27 , ansible , pyyaml , six , nose , setuptools_scm , ruamel_yaml +, pathlib2 }: buildPythonPackage rec { pname = "ansible-lint"; version = "4.2.0"; + # pip is not able to import version info on raumel.yaml + disabled = isPy27; src = fetchPypi { inherit pname version; @@ -21,7 +25,8 @@ buildPythonPackage rec { format = "pyproject"; nativeBuildInputs = [ setuptools_scm ]; - propagatedBuildInputs = [ pyyaml six ansible ruamel_yaml ]; + propagatedBuildInputs = [ pyyaml six ansible ruamel_yaml ] + ++ lib.optionals isPy27 [ pathlib2 ]; checkInputs = [ nose ]; postPatch = ''