about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/tclap/1.4.nix
blob: 7a0b576596331dfb646ce4e83a636eeca9b4200c (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
{ lib
, stdenv
, fetchgit
, cmake
, doxygen
, python3
}:
stdenv.mkDerivation {
  pname = "tclap";

  # This version is slightly newer than 1.4.0-rc1:
  # See https://github.com/mirror/tclap/compare/1.4.0-rc1..3feeb7b2499b37d9cb80890cadaf7c905a9a50c6
  version = "1.4-3feeb7b";

  src = fetchgit {
    url = "git://git.code.sf.net/p/tclap/code";
    rev = "3feeb7b2499b37d9cb80890cadaf7c905a9a50c6"; # 1.4 branch
    hash = "sha256-byLianB6Vf+I9ABMmsmuoGU2o5RO9c5sMckWW0F+GDM=";
  };

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
    substituteInPlace packaging/pkgconfig.pc.in \
      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
  '';

  nativeBuildInputs = [
    cmake
    doxygen
    python3
  ];

  # Installing docs is broken in this package+version so we stub out some files
  preInstall = ''
    touch docs/manual.html
  '';

  doCheck = true;

  meta = with lib; {
    description = "Templatized C++ Command Line Parser Library (v1.4)";
    homepage = "https://tclap.sourceforge.net/";
    license = licenses.mit;
    maintainers = teams.deshaw.members;
    platforms = platforms.all;
  };
}