Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchgit,
5 cmake,
6 doxygen,
7 python3,
8}:
9stdenv.mkDerivation {
10 pname = "tclap";
11
12 # This version is slightly newer than 1.4.0-rc1:
13 # See https://github.com/mirror/tclap/compare/1.4.0-rc1..3feeb7b2499b37d9cb80890cadaf7c905a9a50c6
14 version = "1.4-3feeb7b";
15
16 src = fetchgit {
17 url = "git://git.code.sf.net/p/tclap/code";
18 rev = "3feeb7b2499b37d9cb80890cadaf7c905a9a50c6"; # 1.4 branch
19 hash = "sha256-byLianB6Vf+I9ABMmsmuoGU2o5RO9c5sMckWW0F+GDM=";
20 };
21
22 postPatch = ''
23 substituteInPlace CMakeLists.txt \
24 --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
25 substituteInPlace packaging/pkgconfig.pc.in \
26 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
27 '';
28
29 nativeBuildInputs = [
30 cmake
31 doxygen
32 python3
33 ];
34
35 # Installing docs is broken in this package+version so we stub out some files
36 preInstall = ''
37 touch docs/manual.html
38 '';
39
40 doCheck = true;
41
42 meta = with lib; {
43 description = "Templatized C++ Command Line Parser Library (v1.4)";
44 homepage = "https://tclap.sourceforge.net/";
45 license = licenses.mit;
46 teams = [ teams.deshaw ];
47 platforms = platforms.all;
48 };
49}