summary refs log tree commit diff
path: root/pkgs/development/libraries/uri/default.nix
blob: 980d073f1281e8e91d4c3d66a2dbb0bd1a645939 (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
{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:

stdenv.mkDerivation rec {
  pname = "uri";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "cpp-netlib";
    repo = "uri";
    rev = "v${version}";
    sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
  };

  NIX_CFLAGS_COMPILE = "-Wno-error=parentheses";

  nativeBuildInputs = [ cmake doxygen ];

  cmakeFlags = [
    "-DUri_BUILD_TESTS=OFF" "-DUri_BUILD_DOCS=ON" "-DBUILD_SHARED_LIBS=ON"
  ];

  postBuild = "make doc";

  postInstall = ''
    install -vd $out/share/doc
    cp -vR html $out/share/doc
  '';

  meta = {
    description = "C++ URI library";
    homepage = "https://cpp-netlib.org";
    license = lib.licenses.boost;
    platforms = lib.platforms.all;
  };
}