diff --git a/pkgs/development/python-modules/py-multibase/default.nix b/pkgs/development/python-modules/py-multibase/default.nix index eeb83df5a98b..50f1d9e9b376 100644 --- a/pkgs/development/python-modules/py-multibase/default.nix +++ b/pkgs/development/python-modules/py-multibase/default.nix @@ -1,45 +1,50 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchPypi -, isPy27 -, lib , morphys -, pytest -, pytest-runner +, pytestCheckHook , python-baseconv +, pythonOlder , six }: buildPythonPackage rec { pname = "py-multibase"; version = "1.0.3"; - disabled = isPy27; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version ; - sha256 = "d28a20efcbb61eec28f55827a0bf329c7cea80fffd933aecaea6ae8431267fe4"; + inherit pname version; + hash = "sha256-0oog78u2Huwo9VgnoL8ynHzqgP/9kzrsrqauhDEmf+Q="; }; postPatch = '' - substituteInPlace setup.cfg --replace "[pytest]" "" - substituteInPlace setup.cfg --replace "python_classes = *TestCase" "" + substituteInPlace setup.cfg \ + --replace "[pytest]" "" \ + --replace "python_classes = *TestCase" "" + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" ''; - nativeBuildInputs = [ - pytest-runner - ]; - propagatedBuildInputs = [ morphys - six python-baseconv + six ]; nativeCheckInputs = [ - pytest + pytestCheckHook + ]; + + pythonImportsCheck = [ + "multibase" ]; meta = with lib; { - description = "Multibase is a protocol for distinguishing base encodings and other simple string encodings"; + description = "Module for distinguishing base encodings and other simple string encodings"; homepage = "https://github.com/multiformats/py-multibase"; + changelog = "https://github.com/multiformats/py-multibase/blob/v${version}/HISTORY.rst"; license = licenses.mit; maintainers = with maintainers; [ rakesh4g ]; };