From d9b1f25d5dfa1d7a3055d9f6b12df8e09349cada Mon Sep 17 00:00:00 2001
From: Fabian Affolter <mail@fabian-affolter.ch>
Date: Thu, 28 Jan 2021 12:10:26 +0100
Subject: [PATCH 1/3] python3Packages.canmatrix: 0.9.1 -> 0.9.3

---
 pkgs/development/python-modules/canmatrix/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix
index 6e487b58cff..2004e368285 100644
--- a/pkgs/development/python-modules/canmatrix/default.nix
+++ b/pkgs/development/python-modules/canmatrix/default.nix
@@ -18,14 +18,14 @@
 
 buildPythonPackage rec {
   pname = "canmatrix";
-  version = "0.9.1";
+  version = "0.9.3";
 
   # uses fetchFromGitHub as PyPi release misses test/ dir
   src = fetchFromGitHub {
     owner = "ebroecker";
     repo = pname;
     rev = version;
-    sha256 = "129lcchq45h8wqjvvn0rwpbmih4m0igass2cx7a21z94li97hcia";
+    sha256 = "sha256-9FupG1VmROgsxYhsafQYPPqG0xEOAYYK8QDOIBNzE0Y=";
   };
 
   propagatedBuildInputs = [

From 9e599dd814bed88055b60fe65a26da8a3ad97c1f Mon Sep 17 00:00:00 2001
From: Fabian Affolter <mail@fabian-affolter.ch>
Date: Thu, 28 Jan 2021 12:14:37 +0100
Subject: [PATCH 2/3] python3Packages.canmatrix: switch to pytestCheckHook

---
 .../python-modules/canmatrix/default.nix            | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix
index 2004e368285..8ffacc1a99d 100644
--- a/pkgs/development/python-modules/canmatrix/default.nix
+++ b/pkgs/development/python-modules/canmatrix/default.nix
@@ -13,7 +13,7 @@
 , xlrd
 , XlsxWriter
 , pyyaml
-, pytest
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -48,14 +48,11 @@ buildPythonPackage rec {
       --replace "version = versioneer.get_version()" "version = \"${version}\""
   '';
 
-  checkInputs = [
-    pytest
-  ];
-
+  checkInputs = [ pytestCheckHook ];
   # long_envvar_name_imports requires stable key value pair ordering
-  checkPhase = ''
-    pytest -s src/canmatrix -k 'not long_envvar_name_imports'
-  '';
+  pytestFlagsArray = [ "-s src/canmatrix" ];
+  disabledTests = [ "long_envvar_name_imports" ];
+  pythonImportsCheck = [ "canmatrix" ];
 
   meta = with lib; {
     homepage = "https://github.com/ebroecker/canmatrix";

From 33e48f6aea3cf28081aabb3ab0b2f4320f8b8a02 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <mail@fabian-affolter.ch>
Date: Thu, 4 Feb 2021 09:08:27 +0100
Subject: [PATCH 3/3] python3Packages.canopen: add pythonImportsCheck

---
 pkgs/development/python-modules/canopen/default.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgs/development/python-modules/canopen/default.nix b/pkgs/development/python-modules/canopen/default.nix
index 28f3a74a495..8925c1cc8a4 100644
--- a/pkgs/development/python-modules/canopen/default.nix
+++ b/pkgs/development/python-modules/canopen/default.nix
@@ -29,6 +29,8 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  pythonImportsCheck = [ "canopen" ];
+
   meta = with lib; {
     homepage = "https://github.com/christiansandberg/canopen/";
     description = "CANopen stack implementation";