nixpkgs/pkgs/servers/nfd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, boost179 # probably needs to match the one from ndn-cxx
, fetchFromGitHub
, libpcap
, ndn-cxx
, openssl
, pkg-config
, sphinx
, systemd
2023-09-03 00:24:44 +00:00
, wafHook
, websocketpp
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
, withWebSocket ? true
}:
stdenv.mkDerivation rec {
pname = "nfd";
2022-12-05 09:57:40 +00:00
version = "22.12";
src = fetchFromGitHub {
owner = "named-data";
repo = lib.toUpper pname;
rev = "NFD-${version}";
2022-12-05 09:57:40 +00:00
sha256 = "sha256-epY5qtET7rsKL3KIKvxfa+wF+AGZbYs+zRhy8SnIffk=";
fetchSubmodules = true;
};
2023-09-03 00:24:44 +00:00
nativeBuildInputs = [ pkg-config sphinx wafHook ];
buildInputs = [ libpcap ndn-cxx openssl websocketpp ] ++ lib.optional withSystemd systemd;
wafConfigureFlags = [
"--boost-includes=${boost179.dev}/include"
"--boost-libs=${boost179.out}/lib"
"--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/";
2022-12-18 00:39:44 +00:00
description = "Named Data Networking (NDN) Forwarding Daemon";
license = licenses.gpl3Plus;
platforms = platforms.unix;
2022-12-05 09:57:40 +00:00
maintainers = with maintainers; [ bertof ];
};
}