Merge pull request #122124 from rmcgibbo/cxxfilt

python3Packages.cxxfilt: fix on darwin
This commit is contained in:
Martin Weinelt 2021-05-08 01:20:11 +02:00 committed by GitHub
commit 97cbc7e125
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, gcc-unwrapped
@ -12,9 +13,11 @@ buildPythonPackage rec {
sha256 = "ef6810e76d16c95c11b96371e2d8eefd1d270ec03f9bcd07590e8dcc2c69e92b";
};
postPatch = ''
postPatch = let
libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}";
in ''
substituteInPlace cxxfilt/__init__.py \
--replace "find_any_library('stdc++', 'c++')" '"${lib.getLib gcc-unwrapped}/lib/libstdc++.so"'
--replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"'
'';
# no tests