2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "uri";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "1.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cpp-netlib";
|
|
|
|
repo = "uri";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
|
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([
|
2023-02-16 17:41:37 +00:00
|
|
|
"-Wno-error=parentheses"
|
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=deprecated-declarations"
|
|
|
|
"-Wno-error=nonnull"
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
|
|
# Needed with Clang 16
|
|
|
|
"-Wno-error=deprecated-builtins"
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.boost;
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|