1{ lib
2, stdenv
3, fetchFromGitHub
4, fetchpatch
5, tzdata
6, autoreconfHook
7, openssl
8}:
9
10stdenv.mkDerivation rec {
11 pname = "cxxtools";
12 version = "3.0";
13
14 src = fetchFromGitHub {
15 owner = "maekitalo";
16 repo = "cxxtools";
17 rev = "V${version}";
18 hash = "sha256-AiMVmtvI20nyv/nuHHxGH4xFnlc9AagVkKlnRlaYCPM=";
19 };
20
21 patches = [
22 (fetchpatch {
23 url = "https://github.com/maekitalo/cxxtools/commit/b773c01fc13d2ae67abc0839888e383be23562fd.patch";
24 hash = "sha256-9yRkD+vMRhc4n/Xh6SKtmllBrmfDx3IBVOtHQV6s7Tw=";
25 })
26 (fetchpatch {
27 url = "https://github.com/maekitalo/cxxtools/commit/6e1439a108ce3892428e95f341f2d23ae32a590e.patch";
28 hash = "sha256-ZnlbdWBjL9lEtNLEF/ZPa0IzvJ7i4xWI4GbY8KeA6A4=";
29 })
30 ];
31
32 postPatch = ''
33 substituteInPlace src/tz.cpp \
34 --replace '::getenv("TZDIR")' '"${tzdata}/share/zoneinfo"'
35 '';
36
37 nativeBuildInputs = [
38 autoreconfHook
39 ];
40
41 buildInputs = [
42 openssl
43 ];
44
45 enableParallelBuilding = true;
46
47 meta = {
48 homepage = "http://www.tntnet.org/cxxtools.html";
49 description = "Comprehensive C++ class library for Unix and Linux";
50 platforms = lib.platforms.linux;
51 license = lib.licenses.lgpl21;
52 maintainers = [ lib.maintainers.juliendehos ];
53 };
54}