From 775c2a236b9be4f023394b9cef408dfe4e82a620 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Oct 2021 23:26:00 +0200 Subject: [PATCH] python3Packages.pyserial-asyncio: add pythonImportsCheck --- .../pyserial-asyncio/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyserial-asyncio/default.nix b/pkgs/development/python-modules/pyserial-asyncio/default.nix index 84d5818ec85f..c7990adb4643 100644 --- a/pkgs/development/python-modules/pyserial-asyncio/default.nix +++ b/pkgs/development/python-modules/pyserial-asyncio/default.nix @@ -1,21 +1,31 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k -, pyserial }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pyserial +}: buildPythonPackage rec { pname = "pyserial-asyncio"; version = "0.6"; - disabled = !isPy3k; # Doesn't support python older than 3.4 + disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; sha256 = "sha256-tgMpI+BenXXsF6WvmphCnEbSg5rfr4BgTVLg+qzXoy8="; }; - propagatedBuildInputs = [ pyserial ]; + propagatedBuildInputs = [ + pyserial + ]; + + pythonImportsCheck = [ + "serial_asyncio" + ]; meta = with lib; { - description = "asyncio extension package for pyserial"; + description = "Asyncio extension package for pyserial"; homepage = "https://github.com/pyserial/pyserial-asyncio"; license = licenses.bsd3; maintainers = with maintainers; [ etu ];