nixpkgs/pkgs/development/libraries/libbacktrace/default.nix
John Ericson f52263ced0 treewide: Start to break up static overlay
We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.

CC @FRidh @matthewbauer
2021-01-03 19:18:16 +00:00

27 lines
863 B
Nix

{ stdenv, callPackage, fetchFromGitHub
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
let
yesno = b: if b then "yes" else "no";
in stdenv.mkDerivation rec {
pname = "libbacktrace";
version = "2020-05-13";
src = fetchFromGitHub {
owner = "ianlancetaylor";
repo = pname;
rev = "9b7f216e867916594d81e8b6118f092ac3fcf704";
sha256 = "0qr624v954gnfkmpdlfk66sxz3acyfmv805rybsaggw5gz5sd1nh";
};
configureFlags = [
"--enable-static=${yesno enableStatic}"
"--enable-shared=${yesno enableShared}"
];
meta = with stdenv.lib; {
description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces";
homepage = https://github.com/ianlancetaylor/libbacktrace;
maintainers = with maintainers; [ twey ];
license = with licenses; [ bsd3 ];
};
}