1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 scikit-build-core,
6 cmake,
7 pytestCheckHook,
8 ninja,
9}:
10
11buildPythonPackage rec {
12 pname = "pydemumble";
13 version = "0.0.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "angr";
18 repo = "pydemumble";
19 tag = "v${version}";
20 hash = "sha256-JAUMTOYGHu64L0zLK2dzf0poHrGGiE29WoAR5kRsR+s=";
21 fetchSubmodules = true;
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace-fail \
27 ', "nanobind >=1.3.2"' \
28 ""
29 '';
30
31 build-system = [
32 scikit-build-core
33 ];
34
35 dontUseCmakeConfigure = true;
36 nativeBuildInputs = [
37 cmake
38 ninja
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 enabledTestPaths = [ "tests/" ];
44
45 pythonImportsCheck = [ "pydemumble" ];
46
47 meta = {
48 description = "Demumble wrapper library";
49 longDescription = ''
50 Python wrapper library for demumble; demumble is a tool to
51 demangle C++, Rust, and Swift symbol names.
52 '';
53 homepage = "https://github.com/angr/pydemumble";
54 license = lib.licenses.bsd2;
55 maintainers = with lib.maintainers; [ pbsds ];
56 };
57}