about summary refs log tree commit diff
path: root/pkgs/development/libraries/libsegfault/default.nix
blob: 58896c3e2bc278645762af2bc00698fc8488599e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ stdenv
, lib
, fetchFromGitHub
, meson
, ninja
, boost
, libbacktrace
, unstableGitUpdater
}:

stdenv.mkDerivation rec {
  pname = "libsegfault";
  version = "0-unstable-2022-11-13";

  src = fetchFromGitHub {
    owner = "jonathanpoelen";
    repo = "libsegfault";
    rev = "8bca5964613695bf829c96f7a3a14dbd8304fe1f";
    sha256 = "vKtY6ZEkyK2K+BzJCSo30f9MpERpPlUnarFIlvJ1Giw=";
  };

  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin) "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED=1";

  nativeBuildInputs = [
    meson
    ninja
  ];

  buildInputs = [
    boost
    libbacktrace
  ];

  passthru = {
    updateScript = unstableGitUpdater { };
  };

  meta = with lib; {
    description = "Implementation of libSegFault.so with Boost.stracktrace";
    homepage = "https://github.com/jonathanpoelen/libsegfault";
    license = licenses.asl20;
    maintainers = with maintainers; [ jtojnar ];
    platforms = platforms.unix;
  };
}