1{
2 lib,
3 stdenv,
4 fetchurl,
5 gcc-unwrapped,
6}:
7
8stdenv.mkDerivation rec {
9 version = "1.5.0";
10 pname = "libthreadar";
11
12 src = fetchurl {
13 url = "mirror://sourceforge/libthreadar/${pname}-${version}.tar.gz";
14 sha256 = "sha256-wJAkIUGK7Ud6n2p1275vNkSx/W7LlgKWXQaDevetPko=";
15 };
16
17 postPatch = ''
18 # this field is not present on Darwin, ensure it is zero everywhere
19 substituteInPlace src/thread_signal.cpp \
20 --replace-fail 'sigac.sa_restorer = nullptr;' "" \
21 --replace-fail 'struct sigaction sigac;' 'struct sigaction sigac = {0};'
22 '';
23
24 outputs = [
25 "out"
26 "dev"
27 ];
28
29 buildInputs = [ gcc-unwrapped ];
30
31 CXXFLAGS = [ "-std=c++14" ];
32
33 configureFlags = [
34 "--disable-build-html"
35 ];
36
37 postInstall = ''
38 # Disable html help
39 rm -r "$out"/share
40 '';
41
42 meta = with lib; {
43 homepage = "https://libthreadar.sourceforge.net/";
44 description = "C++ library that provides several classes to manipulate threads";
45 longDescription = ''
46 Libthreadar is a C++ library providing a small set of C++ classes to manipulate
47 threads in a very simple and efficient way from your C++ code.
48 '';
49 maintainers = with maintainers; [ izorkin ];
50 license = licenses.lgpl3;
51 platforms = platforms.unix;
52 };
53}