Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, cmake, gtest }: 2 3stdenv.mkDerivation rec { 4 pname = "uriparser"; 5 version = "0.9.7"; 6 7 # Release tarball differs from source tarball 8 src = fetchurl { 9 url = "https://github.com/uriparser/uriparser/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2"; 10 sha256 = "sha256-0n3qDItvb7l5jwfK7e8c2WpuP8XGGJWWd04Zr6fd3tc="; 11 }; 12 13 nativeBuildInputs = [ cmake ]; 14 15 cmakeFlags = [ 16 "-DURIPARSER_BUILD_DOCS=OFF" 17 ] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF"; 18 19 nativeCheckInputs = [ gtest ]; 20 doCheck = stdenv.buildPlatform == stdenv.hostPlatform; 21 22 meta = with lib; { 23 description = "Strictly RFC 3986 compliant URI parsing library"; 24 longDescription = '' 25 uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. 26 API documentation is available on uriparser website. 27 ''; 28 homepage = "https://uriparser.github.io/"; 29 license = licenses.bsd3; 30 maintainers = with maintainers; [ bosu ]; 31 mainProgram = "uriparse"; 32 platforms = platforms.unix; 33 }; 34}