1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6 pythonOlder,
7 pytestCheckHook,
8 setuptools,
9 yasm,
10}:
11
12buildPythonPackage rec {
13 pname = "distorm3";
14 version = "3.5.2";
15 pyproject = true;
16
17 # Still uses distutils, https://github.com/gdabah/distorm/issues/191
18 disabled = pythonOlder "3.5" || pythonAtLeast "3.12";
19
20 src = fetchFromGitHub {
21 owner = "gdabah";
22 repo = "distorm";
23 rev = "refs/tags/${version}";
24 hash = "sha256-Fhvxag2UN5wXEySP1n1pCahMQR/SfssywikeLmiASwQ=";
25 };
26
27 build-system = [ setuptools ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 yasm
32 ];
33
34 disabledTests = [
35 # TypeError: __init__() missing 3 required positional...
36 "test_dummy"
37 ];
38
39 pythonImportsCheck = [ "distorm3" ];
40
41 meta = with lib; {
42 description = "Disassembler library for x86/AMD64";
43 homepage = "https://github.com/gdabah/distorm";
44 changelog = "https://github.com/gdabah/distorm/releases/tag/${version}";
45 license = licenses.bsd3;
46 maintainers = with maintainers; [ fab ];
47 };
48}