2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-01-03 16:56:52 +00:00
|
|
|
, boost175
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, libpcap
|
|
|
|
, ndn-cxx
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, sphinx
|
|
|
|
, systemd
|
|
|
|
, wafHook
|
|
|
|
, websocketpp
|
|
|
|
, withSystemd ? stdenv.isLinux
|
|
|
|
, withWebSocket ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nfd";
|
|
|
|
version = "0.7.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "named-data";
|
|
|
|
repo = lib.toUpper pname;
|
|
|
|
rev = "NFD-${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-8Zm8oxbpw9qD31NuofDdgPYnTWIz5E04NhkZhiRkK9E=";
|
2021-12-06 16:07:01 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config sphinx wafHook ];
|
|
|
|
buildInputs = [ libpcap ndn-cxx openssl websocketpp ] ++ lib.optional withSystemd systemd;
|
|
|
|
|
|
|
|
wafConfigureFlags = [
|
2022-01-03 16:56:52 +00:00
|
|
|
"--boost-includes=${boost175.dev}/include"
|
|
|
|
"--boost-libs=${boost175.out}/lib"
|
2021-12-06 16:07:01 +00:00
|
|
|
"--with-tests"
|
|
|
|
] ++ lib.optional (!withWebSocket) "--without-websocket";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
build/unit-tests-core
|
|
|
|
# build/unit-tests-daemon # 3 tests fail
|
|
|
|
build/unit-tests-rib
|
|
|
|
build/unit-tests-tools
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://named-data.net/";
|
|
|
|
description = "Named Data Neworking (NDN) Forwarding Daemon";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.bertof ];
|
|
|
|
};
|
|
|
|
}
|