nixpkgs/pkgs/development/python-modules/cxxfilt/default.nix

37 lines
859 B
Nix
Raw Normal View History

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";
version = "0.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "ef6810e76d16c95c11b96371e2d8eefd1d270ec03f9bcd07590e8dcc2c69e92b";
};
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;
};
}