12 buildPythonPackage rec {
15 format = "setuptools";
17 disabled = pythonOlder "3.6";
19 src = fetchFromGitHub {
22 rev = "refs/tags/${version}";
23 hash = "sha256-Fn1cyUPMrn1SEXl4sdQwJiNHaY+BbxBDz3nKZY965/0=";
26 # Backport magics for newer newer python versions
27 # 6.1.1 only supports up to 3.12.4 while nixpkgs is already on 3.12.5+
30 url = "https://github.com/rocky/python-xdis/commit/fcba74a7f64c5e2879ca0779ff10f38f9229e7da.patch";
31 hash = "sha256-D7eJ97g4G6pmYL/guq0Ndf8yKTVBD2gAuUCAKwvlYbE=";
34 url = "https://github.com/rocky/python-xdis/commit/b66976ff53a2c6e17a73fb7652ddd6c8054df8db.patch";
35 hash = "sha256-KO1y0nDTPmEZ+0/3Pjh+CvTdpr/p4AYZ8XdH5J+XzXo=";
39 propagatedBuildInputs = [
44 nativeCheckInputs = [ pytestCheckHook ];
46 pythonImportsCheck = [ "xdis" ];
49 # import file mismatch:
50 # imported module 'test_disasm' has this __file__ attribute:
51 # /build/source/pytest/test_disasm.py
52 # which is not the same as the test file we want to collect:
53 # /build/source/test_unit/test_disasm.py
54 "test_unit/test_disasm.py"
56 # Doesn't run on non-2.7 but has global-level mis-import
57 "test_unit/test_dis27.py"
59 # Has Python 2 style prints
60 "test/decompyle/test_nested_scopes.py"
64 # AssertionError: events did not match expectation
66 # AssertionError: False is not true : PYTHON VERSION 4.0 is not in magic.magics.keys
71 description = "Python cross-version byte-code disassembler and marshal routines";
72 homepage = "https://github.com/rocky/python-xdis";
73 changelog = "https://github.com/rocky/python-xdis/releases/tag/${version}";
74 license = lib.licenses.gpl2Plus;
75 maintainers = with lib.maintainers; [