Commit 1545da4c authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.simplefix: switch to unittestCheckHook

- add pythonImportsCheck
parent 43185ef7
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
{ 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";