1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, gcc-unwrapped
6}:
7buildPythonPackage rec {
8 pname = "cxxfilt";
9 version = "0.3.0";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "7df6464ba5e8efbf0d8974c0b2c78b32546676f06059a83515dbdfa559b34214";
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}