From 0063d3d668cf93fcdefa7f4b4778ddc59d588443 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 4 Oct 2021 11:18:29 +0200 Subject: [PATCH 1/2] python3Packages.distorm3: 3.3.4 -> 3.5.2 --- .../python-modules/distorm3/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/distorm3/default.nix b/pkgs/development/python-modules/distorm3/default.nix index d798414c1974..7a0b23e77a74 100644 --- a/pkgs/development/python-modules/distorm3/default.nix +++ b/pkgs/development/python-modules/distorm3/default.nix @@ -1,21 +1,29 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: buildPythonPackage rec { pname = "distorm3"; - version = "3.3.4"; + version = "3.5.2"; - src = fetchPypi { - inherit pname version; - extension = "zip"; - sha256 = "1bh9xdiz9mkf9lfffimfn3hgd0mh60y7wl1micgkxzpl7hnxrpd4"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "gdabah"; + repo = "distorm"; + rev = version; + sha256 = "012bh1l2w7i9q8rcnznj3x0lra09d5yxd3r42cbrqdwl1mmg26qn"; }; # no tests included doCheck = false; meta = with lib; { - description = "Powerful Disassembler Library For x86/AMD64"; + description = "Disassembler library for x86/AMD64"; homepage = "https://github.com/gdabah/distorm"; license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; }; } From 8467f29068956b7b10d9a6174089295b60e5a704 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 4 Oct 2021 11:24:18 +0200 Subject: [PATCH 2/2] python3Packages.distorm3: enable tests --- .../python-modules/distorm3/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/distorm3/default.nix b/pkgs/development/python-modules/distorm3/default.nix index 7a0b23e77a74..715e8c357143 100644 --- a/pkgs/development/python-modules/distorm3/default.nix +++ b/pkgs/development/python-modules/distorm3/default.nix @@ -2,6 +2,8 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, pytestCheckHook +, yasm }: buildPythonPackage rec { @@ -17,8 +19,17 @@ buildPythonPackage rec { sha256 = "012bh1l2w7i9q8rcnznj3x0lra09d5yxd3r42cbrqdwl1mmg26qn"; }; - # no tests included - doCheck = false; + checkInputs = [ + pytestCheckHook + yasm + ]; + + disabledTests = [ + # TypeError: __init__() missing 3 required positional... + "test_dummy" + ]; + + pythonImportsCheck = [ "distorm3" ]; meta = with lib; { description = "Disassembler library for x86/AMD64";