Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, doxygen }: 2 3stdenv.mkDerivation rec { 4 pname = "uri"; 5 version = "1.1.0"; 6 7 src = fetchFromGitHub { 8 owner = "cpp-netlib"; 9 repo = "uri"; 10 rev = "v${version}"; 11 sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd"; 12 }; 13 14 env.NIX_CFLAGS_COMPILE = toString [ 15 "-Wno-error=parentheses" 16 # Needed with GCC 12 17 "-Wno-error=deprecated-declarations" 18 "-Wno-error=nonnull" 19 ]; 20 21 nativeBuildInputs = [ cmake doxygen ]; 22 23 cmakeFlags = [ 24 "-DUri_BUILD_TESTS=OFF" "-DUri_BUILD_DOCS=ON" "-DBUILD_SHARED_LIBS=ON" 25 ]; 26 27 postBuild = "make doc"; 28 29 postInstall = '' 30 install -vd $out/share/doc 31 cp -vR html $out/share/doc 32 ''; 33 34 meta = { 35 description = "C++ URI library"; 36 homepage = "https://cpp-netlib.org"; 37 license = lib.licenses.boost; 38 platforms = lib.platforms.all; 39 }; 40}