2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, callPackage, fetchFromGitHub
|
2020-12-20 06:11:26 +00:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2019-10-28 11:55:22 +00:00
|
|
|
let
|
|
|
|
yesno = b: if b then "yes" else "no";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "libbacktrace";
|
2020-06-16 20:07:13 +00:00
|
|
|
version = "2020-05-13";
|
2019-10-28 11:55:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ianlancetaylor";
|
|
|
|
repo = pname;
|
2020-06-16 20:07:13 +00:00
|
|
|
rev = "9b7f216e867916594d81e8b6118f092ac3fcf704";
|
|
|
|
sha256 = "0qr624v954gnfkmpdlfk66sxz3acyfmv805rybsaggw5gz5sd1nh";
|
2019-10-28 11:55:22 +00:00
|
|
|
};
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-static=${yesno enableStatic}"
|
|
|
|
"--enable-shared=${yesno enableShared}"
|
|
|
|
];
|
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 ];
|
|
|
|
};
|
|
|
|
}
|