2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-02-16 17:41:37 +00:00
|
|
|
, boost
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, libpcap
|
|
|
|
, ndn-cxx
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, sphinx
|
|
|
|
, wafHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ndn-tools";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "22.12";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "named-data";
|
|
|
|
repo = pname;
|
|
|
|
rev = "ndn-tools-${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-28sPgo2nq5AhIzZmvDz38echGPzKDzNm2J6iIao4yL8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
# Hacky workaround for new pcap-config.
|
|
|
|
postPatch = ''
|
|
|
|
patch -p1 <<EOF
|
|
|
|
--- a/tools/dump/wscript
|
|
|
|
+++ b/tools/dump/wscript
|
|
|
|
@@ -5 +5 @@
|
|
|
|
- conf.check_cfg(package='libpcap', uselib_store='PCAP',
|
|
|
|
+ conf.check_cfg(package="", uselib_store='PCAP',
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ pkg-config sphinx wafHook ];
|
|
|
|
buildInputs = [ libpcap ndn-cxx openssl ];
|
|
|
|
|
|
|
|
wafConfigureFlags = [
|
2023-02-16 17:41:37 +00:00
|
|
|
"--boost-includes=${boost.dev}/include"
|
|
|
|
"--boost-libs=${boost.out}/lib"
|
|
|
|
"--with-tests"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
doCheck = false; # some tests fail because of the sandbox environment
|
2021-12-06 16:07:01 +00:00
|
|
|
checkPhase = ''
|
2022-01-03 16:56:52 +00:00
|
|
|
runHook preCheck
|
2021-12-06 16:07:01 +00:00
|
|
|
build/unit-tests
|
2022-01-03 16:56:52 +00:00
|
|
|
runHook postCheck
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://named-data.net/";
|
2022-12-28 21:21:41 +00:00
|
|
|
description = "Named Data Networking (NDN) Essential Tools";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ bertof ];
|
|
|
|
};
|
|
|
|
}
|