2021-03-19 16:12:48 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, gtest }:
|
2015-07-18 11:17:46 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "uriparser";
|
2022-10-06 01:09:09 +00:00
|
|
|
version = "0.9.7";
|
2015-07-18 11:17:46 +00:00
|
|
|
|
2018-08-21 13:39:35 +00:00
|
|
|
# Release tarball differs from source tarball
|
2015-07-18 11:17:46 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://github.com/uriparser/uriparser/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2";
|
2022-10-06 01:09:09 +00:00
|
|
|
sha256 = "sha256-0n3qDItvb7l5jwfK7e8c2WpuP8XGGJWWd04Zr6fd3tc=";
|
2015-07-18 11:17:46 +00:00
|
|
|
};
|
|
|
|
|
2020-04-23 20:32:41 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DURIPARSER_BUILD_DOCS=OFF"
|
2022-01-17 14:24:45 +00:00
|
|
|
] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
|
2020-04-23 20:08:12 +00:00
|
|
|
|
|
|
|
checkInputs = [ gtest ];
|
2022-01-17 14:24:45 +00:00
|
|
|
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
2015-07-18 11:17:46 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-07-18 11:17:46 +00:00
|
|
|
description = "Strictly RFC 3986 compliant URI parsing library";
|
2017-03-03 18:00:59 +00:00
|
|
|
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-05 00:52:27 +00:00
|
|
|
homepage = "https://uriparser.github.io/";
|
2017-03-03 18:00:59 +00:00
|
|
|
license = licenses.bsd3;
|
2015-07-18 11:17:46 +00:00
|
|
|
maintainers = with maintainers; [ bosu ];
|
2022-05-05 00:52:27 +00:00
|
|
|
mainProgram = "uriparse";
|
|
|
|
platforms = platforms.unix;
|
2015-07-18 11:17:46 +00:00
|
|
|
};
|
|
|
|
}
|