2022-12-24 11:42:30 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2020-12-20 06:11:26 +00:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
2022-12-24 11:42:30 +00:00
|
|
|
, unstableGitUpdater
|
2022-12-24 19:46:00 +00:00
|
|
|
, autoreconfHook
|
2020-12-20 06:11:26 +00:00
|
|
|
}:
|
2022-12-24 11:42:30 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-10-28 11:55:22 +00:00
|
|
|
pname = "libbacktrace";
|
2022-12-24 11:42:52 +00:00
|
|
|
version = "unstable-2022-12-16";
|
2022-12-24 11:42:30 +00:00
|
|
|
|
2019-10-28 11:55:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ianlancetaylor";
|
2022-12-24 11:42:30 +00:00
|
|
|
repo = "libbacktrace";
|
2022-12-24 11:42:52 +00:00
|
|
|
rev = "da7eff2f37e38136c5a0c8922957b9dfab5483ef";
|
|
|
|
sha256 = "ADp8n1kUf8OysFY/Jv1ytxKjqgz1Nu2VRcFGlt1k/HM=";
|
2019-10-28 11:55:22 +00:00
|
|
|
};
|
2022-12-24 11:42:30 +00:00
|
|
|
|
2022-12-24 19:46:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fix tests with shared library.
|
|
|
|
# https://github.com/ianlancetaylor/libbacktrace/pull/99
|
|
|
|
./0001-libbacktrace-avoid-libtool-wrapping-tests.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
2019-10-28 11:55:22 +00:00
|
|
|
configureFlags = [
|
2022-12-24 11:42:30 +00:00
|
|
|
(lib.enableFeature enableStatic "static")
|
|
|
|
(lib.enableFeature enableShared "shared")
|
2019-10-28 11:55:22 +00:00
|
|
|
];
|
2022-12-24 11:42:30 +00:00
|
|
|
|
2022-12-24 19:46:00 +00:00
|
|
|
doCheck = stdenv.isLinux;
|
|
|
|
|
2022-12-24 11:42:30 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = unstableGitUpdater { };
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-10-28 11:55:22 +00:00
|
|
|
description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces";
|
2021-11-10 10:37:56 +00:00
|
|
|
homepage = "https://github.com/ianlancetaylor/libbacktrace";
|
2019-10-28 11:55:22 +00:00
|
|
|
maintainers = with maintainers; [ twey ];
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
};
|
|
|
|
}
|