2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
2021-04-25 03:57:28 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, gcc-unwrapped
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cxxfilt";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.3.0";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "7df6464ba5e8efbf0d8974c0b2c78b32546676f06059a83515dbdfa559b34214";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postPatch = let
|
|
|
|
libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
in ''
|
2021-04-25 03:57:28 +00:00
|
|
|
substituteInPlace cxxfilt/__init__.py \
|
2021-05-20 23:08:51 +00:00
|
|
|
--replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"'
|
2021-04-25 03:57:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cxxfilt"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Demangling C++ symbols in Python / interface to abi::__cxa_demangle ";
|
|
|
|
homepage = "https://github.com/afq984/python-cxxfilt";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = teams.determinatesystems.members;
|
|
|
|
};
|
|
|
|
}
|