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