Files
nixpkgs/pkgs/development/python-modules/cxxfilt/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

39 lines
867 B
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
gcc-unwrapped,
}:
buildPythonPackage rec {
pname = "cxxfilt";
version = "0.3.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "7df6464ba5e8efbf0d8974c0b2c78b32546676f06059a83515dbdfa559b34214";
};
postPatch =
let
libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}";
in
''
substituteInPlace cxxfilt/__init__.py \
--replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"'
'';
# no tests
doCheck = false;
pythonImportsCheck = [ "cxxfilt" ];
meta = {
description = "Demangling C++ symbols in Python / interface to abi::__cxa_demangle";
homepage = "https://github.com/afq984/python-cxxfilt";
license = lib.licenses.bsd2;
maintainers = [ ];
};
}