diff --git a/pkgs/development/python-modules/confuse/default.nix b/pkgs/development/python-modules/confuse/default.nix index b5e225fa2a2b..2b350be00460 100644 --- a/pkgs/development/python-modules/confuse/default.nix +++ b/pkgs/development/python-modules/confuse/default.nix @@ -1,25 +1,45 @@ { buildPythonPackage , enum34 -, fetchPypi +, fetchFromGitHub +, flit-core , isPy27 , lib , pathlib , pyyaml +, pytestCheckHook }: buildPythonPackage rec { pname = "confuse"; version = "1.5.0"; + format = "flit"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-kvvKHHBhESDqciNy4MBxwNNCp195a0veS/A0jqSfAi4="; + src = fetchFromGitHub { + owner = "beetbox"; + repo = pname; + rev = "v${version}"; + sha256 = "1kvilxhjifvz6ra64jadf9jiwphrah5rcb9ryq0v7w1dywgn4qp7"; }; - propagatedBuildInputs = [ pyyaml ] ++ lib.optionals isPy27 [ enum34 pathlib ] ; + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + pyyaml + ] ++ lib.optionals isPy27 [ + enum34 + pathlib + ] ; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "confuse" ]; meta = with lib; { - description = "Confuse is a configuration library for Python that uses YAML."; + description = "Python configuration library for Python that uses YAML"; homepage = "https://github.com/beetbox/confuse"; license = licenses.mit; maintainers = with maintainers; [ lovesegfault ];