2021-04-08 16:26:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, gtest }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "uriparser";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.9.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Release tarball differs from source tarball
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/uriparser/uriparser/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-0n3qDItvb7l5jwfK7e8c2WpuP8XGGJWWd04Zr6fd3tc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DURIPARSER_BUILD_DOCS=OFF"
|
2022-01-19 23:45:15 +00:00
|
|
|
] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ gtest ];
|
2022-01-19 23:45:15 +00:00
|
|
|
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Strictly RFC 3986 compliant URI parsing library";
|
|
|
|
longDescription = ''
|
|
|
|
uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C.
|
|
|
|
API documentation is available on uriparser website.
|
|
|
|
'';
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://uriparser.github.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bosu ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "uriparse";
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|