1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, gcc-unwrapped
6}:
7buildPythonPackage rec {
8 pname = "cxxfilt";
9 version = "0.2.2";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "ef6810e76d16c95c11b96371e2d8eefd1d270ec03f9bcd07590e8dcc2c69e92b";
14 };
15
16 postPatch = let
17 libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}";
18 in ''
19 substituteInPlace cxxfilt/__init__.py \
20 --replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"'
21 '';
22
23 # no tests
24 doCheck = false;
25
26 pythonImportsCheck = [
27 "cxxfilt"
28 ];
29
30 meta = with lib; {
31 description = "Demangling C++ symbols in Python / interface to abi::__cxa_demangle ";
32 homepage = "https://github.com/afq984/python-cxxfilt";
33 license = licenses.bsd2;
34 maintainers = teams.determinatesystems.members;
35 };
36}