2021-04-18 17:38:39 +01:00
|
|
|
{ lib
|
2021-05-07 23:51:08 +01:00
|
|
|
, stdenv
|
2021-04-18 17:38:39 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, gcc-unwrapped
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cxxfilt";
|
2021-08-26 20:32:32 +01:00
|
|
|
version = "0.3.0";
|
2021-04-18 17:38:39 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-26 20:32:32 +01:00
|
|
|
sha256 = "7df6464ba5e8efbf0d8974c0b2c78b32546676f06059a83515dbdfa559b34214";
|
2021-04-18 17:38:39 +01:00
|
|
|
};
|
|
|
|
|
2021-05-07 23:51:08 +01:00
|
|
|
postPatch = let
|
|
|
|
libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
in ''
|
2021-04-18 17:38:39 +01:00
|
|
|
substituteInPlace cxxfilt/__init__.py \
|
2021-05-07 23:51:08 +01:00
|
|
|
--replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"'
|
2021-04-18 17:38:39 +01: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;
|
|
|
|
};
|
|
|
|
}
|