about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/cxxtools/default.nix
blob: 8682c8ba819657bb9b3f49184adb19c104dd41cc (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
46
47
48
49
50
51
52
53
54
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, tzdata
, autoreconfHook
, openssl
}:

stdenv.mkDerivation rec {
  pname = "cxxtools";
  version = "3.0";

  src = fetchFromGitHub {
    owner = "maekitalo";
    repo = "cxxtools";
    rev = "V${version}";
    hash = "sha256-AiMVmtvI20nyv/nuHHxGH4xFnlc9AagVkKlnRlaYCPM=";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/maekitalo/cxxtools/commit/b773c01fc13d2ae67abc0839888e383be23562fd.patch";
      hash = "sha256-9yRkD+vMRhc4n/Xh6SKtmllBrmfDx3IBVOtHQV6s7Tw=";
    })
    (fetchpatch {
      url = "https://github.com/maekitalo/cxxtools/commit/6e1439a108ce3892428e95f341f2d23ae32a590e.patch";
      hash = "sha256-ZnlbdWBjL9lEtNLEF/ZPa0IzvJ7i4xWI4GbY8KeA6A4=";
    })
  ];

  postPatch = ''
    substituteInPlace src/tz.cpp \
      --replace '::getenv("TZDIR")' '"${tzdata}/share/zoneinfo"'
  '';

  nativeBuildInputs = [
    autoreconfHook
  ];

  buildInputs = [
    openssl
  ];

  enableParallelBuilding = true;

  meta = {
    homepage = "http://www.tntnet.org/cxxtools.html";
    description = "Comprehensive C++ class library for Unix and Linux";
    platforms = lib.platforms.linux;
    license = lib.licenses.lgpl21;
    maintainers = [ lib.maintainers.juliendehos ];
  };
}