From 1545da4c45b01ac648ddc50975b31bb57d0b5167 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Sep 2023 09:34:23 +0200 Subject: [PATCH] python311Packages.simplefix: switch to unittestCheckHook - add pythonImportsCheck --- .../python-modules/simplefix/default.nix | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/simplefix/default.nix b/pkgs/development/python-modules/simplefix/default.nix index 7ea8182d1acc..329c1ba313e0 100644 --- a/pkgs/development/python-modules/simplefix/default.nix +++ b/pkgs/development/python-modules/simplefix/default.nix @@ -1,8 +1,16 @@ -{ lib, python, buildPythonPackage, fetchFromGitHub }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, unittestCheckHook +}: buildPythonPackage rec { pname = "simplefix"; version = "1.0.17"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { repo = "simplefix"; @@ -11,10 +19,18 @@ buildPythonPackage rec { hash = "sha256-D85JW3JRQ1xErw6krMbAg94WYjPi76Xqjv/MGNMY5ZU="; }; - checkPhase = '' - cd test - ${python.interpreter} -m unittest all - ''; + nativeCheckInputs = [ + unittestCheckHook + ]; + + pythonImportsCheck = [ + "simplefix" + ]; + + unittestFlagsArray = [ + "-s" + "test" + ]; meta = with lib; { description = "Simple FIX Protocol implementation for Python";