5 enableStatic ? stdenv.hostPlatform.isStatic,
6 enableShared ? !stdenv.hostPlatform.isStatic,
12 pname = "libbacktrace";
13 version = "0-unstable-2024-03-02";
15 src = fetchFromGitHub {
16 owner = "ianlancetaylor";
17 repo = "libbacktrace";
18 rev = "28824f2cc9069e3fdc39d3702acdf753e35c41b4";
19 sha256 = "1k1O1GT22hZAWPF8NYP0y4qe+e3pGfzT9Mz2TH+H/v4=";
23 # Fix tests with shared library.
24 # https://github.com/ianlancetaylor/libbacktrace/pull/99
25 ./0001-libbacktrace-avoid-libtool-wrapping-tests.patch
27 # Support multiple debug dirs.
28 # https://github.com/ianlancetaylor/libbacktrace/pull/100
29 ./0002-libbacktrace-Allow-configuring-debug-dir.patch
30 ./0003-libbacktrace-Support-multiple-build-id-directories.patch
32 # Support NIX_DEBUG_INFO_DIRS environment variable.
33 ./0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch
41 (lib.enableFeature enableStatic "static")
42 (lib.enableFeature enableShared "shared")
45 doCheck = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl;
48 updateScript = unstableGitUpdater { };
52 description = "C library that may be linked into a C/C++ program to produce symbolic backtraces";
53 homepage = "https://github.com/ianlancetaylor/libbacktrace";
54 maintainers = with maintainers; [ twey ];
55 license = with licenses; [ bsd3 ];