From 1bd9ff368f1b59f405a7cd950fd43bc336e29016 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 18 May 2022 08:34:55 +0200 Subject: [PATCH] python310Packages.marshmallow-oneofschema: enable tests --- .../marshmallow-oneofschema/default.nix | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/marshmallow-oneofschema/default.nix b/pkgs/development/python-modules/marshmallow-oneofschema/default.nix index a4b15ce9a54..8fc946305bc 100644 --- a/pkgs/development/python-modules/marshmallow-oneofschema/default.nix +++ b/pkgs/development/python-modules/marshmallow-oneofschema/default.nix @@ -1,22 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi, marshmallow, setuptools }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, marshmallow +, pytestCheckHook +, pythonOlder +, setuptools +}: buildPythonPackage rec { pname = "marshmallow-oneofschema"; version = "3.0.1"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "62cd2099b29188c92493c2940ee79d1bf2f2619a71721664e5a98ec2faa58237"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "marshmallow-code"; + repo = pname; + rev = version; + hash = "sha256-x0v8WkfjGkP2668QIQiewQViYFDIS2zBWMULcDThWas="; }; - propagatedBuildInputs = [ marshmallow setuptools ]; + propagatedBuildInputs = [ + marshmallow + setuptools + ]; + + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "marshmallow_oneofschema" ]; + pythonImportsCheck = [ + "marshmallow_oneofschema" + ]; meta = with lib; { - homepage = "https://github.com/marshmallow-code/marshmallow-oneofschema"; description = "Marshmallow library extension that allows schema (de)multiplexing"; + homepage = "https://github.com/marshmallow-code/marshmallow-oneofschema"; license = licenses.mit; - maintainers = [ maintainers.ivan-tkatchev ]; + maintainers = with maintainers; [ ivan-tkatchev ]; }; }