mini-calc: 3.3.3 -> 3.3.5 (#372274)
[NixPkgs.git] / pkgs / by-name / li / libbacktrace / package.nix
blob33ce3d6a0ebe8272255039bba7e211302e3b2c68
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   enableStatic ? stdenv.hostPlatform.isStatic,
6   enableShared ? !stdenv.hostPlatform.isStatic,
7   unstableGitUpdater,
8   autoreconfHook,
9 }:
11 stdenv.mkDerivation {
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=";
20   };
22   patches = [
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
34   ];
36   nativeBuildInputs = [
37     autoreconfHook
38   ];
40   configureFlags = [
41     (lib.enableFeature enableStatic "static")
42     (lib.enableFeature enableShared "shared")
43   ];
45   doCheck = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl;
47   passthru = {
48     updateScript = unstableGitUpdater { };
49   };
51   meta = with lib; {
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 ];
56   };