From 815299d47872889093b428aff730eec84c93e95e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 19 Apr 2022 15:00:27 +0200 Subject: [PATCH] cantoolz: disable failing test - migrate to python3.pkgs.buildPythonApplication --- pkgs/tools/networking/cantoolz/default.nix | 32 ++++++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/tools/networking/cantoolz/default.nix b/pkgs/tools/networking/cantoolz/default.nix index 11a0315184c..b31dc21b7a3 100644 --- a/pkgs/tools/networking/cantoolz/default.nix +++ b/pkgs/tools/networking/cantoolz/default.nix @@ -1,26 +1,18 @@ { lib -, bitstring -, buildPythonApplication , fetchFromGitHub , fetchpatch -, flask -, mido -, numpy -, pyserial -, pytestCheckHook -, pythonOlder +, python3 }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "cantoolz"; version = "3.7.0"; - disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "CANToolz"; repo = "CANToolz"; rev = "v${version}"; - sha256 = "0xkj7zyx6pz866q61c84mdagpgdyd633v85hk7qxhamca33rc4yi"; + sha256 = "sha256-0ROWx1CsKtjxmbCgPYZpvr37VKsEsWCwMehf0/0/cnY="; }; patches = [ @@ -31,7 +23,7 @@ buildPythonApplication rec { }) ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ flask pyserial mido @@ -39,9 +31,19 @@ buildPythonApplication rec { bitstring ]; - checkInputs = [ pytestCheckHook ]; - disabledTests = [ "test_process" ]; - pythonImportsCheck = [ "cantoolz" ]; + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + disabledTests = [ + "test_process" + # Sandbox issue + "test_server" + ]; + + pythonImportsCheck = [ + "cantoolz" + ]; meta = with lib; { description = "Black-box CAN network analysis framework"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf0e839a16c..d4fe283f359 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4405,7 +4405,7 @@ with pkgs; cantata = libsForQt5.callPackage ../applications/audio/cantata { }; - cantoolz = python3Packages.callPackage ../tools/networking/cantoolz { }; + cantoolz = callPackage ../tools/networking/cantoolz { }; can-utils = callPackage ../os-specific/linux/can-utils { };