Commit a78ac90b authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.volvooncall: add patch to remove asynctest

parent c7119389
Loading
Loading
Loading
Loading
+27 −15
Original line number Diff line number Diff line
{ lib
, aiohttp
, amqtt
, buildPythonPackage
, pythonOlder
, certifi
, docopt
, fetchFromGitHub
, setuptools
, fetchpatch
, geopy
, docopt
, certifi
, amqtt
, websockets
, aiohttp
, pytestCheckHook
, asynctest
, mock
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, setuptools
, websockets
}:

buildPythonPackage rec {
  pname = "volvooncall";
  version = "0.10.1";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  format = "setuptools";

  src = fetchFromGitHub {
    owner = "molobrakos";
    repo = "volvooncall";
    rev = "v${version}";
    rev = "refs/tags/v${version}";
    hash = "sha256-udYvgKj7Rlc/hA86bbeBfnoVRjKkXT4TwpceWz226cU=";
  };

  patches = [
    # Remove async, https://github.com/molobrakos/volvooncall/pull/92
    (fetchpatch {
      name = "remove-asnyc.patch";
      url = "https://github.com/molobrakos/volvooncall/commit/ef0df403250288c00ed4c600e9dfa79dcba8941e.patch";
      hash = "sha256-U+hM7vzD9JSEUumvjPSLpVQcc8jAuZHG3/1dQ3wnIcA=";
    })
  ];

  propagatedBuildInputs = [
    aiohttp
  ];
@@ -45,17 +54,20 @@ buildPythonPackage rec {
    ];
  };

  nativeCheckInputs = [
    asynctest
  checkInputs = [
    mock
    pytest-asyncio
    pytestCheckHook
  ] ++ passthru.optional-dependencies.mqtt;

  pythonImportsCheck = [ "volvooncall" ];
  pythonImportsCheck = [
    "volvooncall"
  ];

  meta = with lib; {
    description = "Retrieve information from the Volvo On Call web service";
    homepage = "https://github.com/molobrakos/volvooncall";
    changelog = "https://github.com/molobrakos/volvooncall/releases/tag/v${version}";
    license = licenses.unlicense;
    maintainers = with maintainers; [ dotlambda ];
  };