NDN: fix builds after boost upgrade

- updated derivations with the correct boost version
- prepared check phases for unit tests. Some of them don't work on upstream and have already been reported years ago
- checked that the produced software works as expected
This commit is contained in:
Filippo Berto 2021-12-30 15:49:41 +01:00
parent 96dae08553
commit 3aee8d70cc
No known key found for this signature in database
GPG Key ID: FE98AE5EC52B1056
4 changed files with 30 additions and 20 deletions

@ -1,11 +1,12 @@
{ lib, stdenv
{ lib
, stdenv
, fetchFromGitHub
, doxygen
, pkg-config
, python3
, python3Packages
, wafHook
, boost
, boost175
, openssl
, sqlite
}:
@ -18,19 +19,28 @@ stdenv.mkDerivation rec {
owner = "named-data";
repo = "ndn-cxx";
rev = "${pname}-${version}";
sha256 = "1lcaqc79n3d9sip7knddblba17sz18b0w7nlxmj3fz3lb3z9qd51";
sha256 = "sha256-oTSc/lh0fDdk7dQeDhYKX5+gFl2t2Xlu1KkNmw7DitE=";
};
nativeBuildInputs = [ doxygen pkg-config python3 python3Packages.sphinx wafHook ];
buildInputs = [ boost openssl sqlite ];
buildInputs = [ boost175 openssl sqlite ];
wafConfigureFlags = [
"--with-openssl=${openssl.dev}"
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.out}/lib"
"--boost-includes=${boost175.dev}/include"
"--boost-libs=${boost175.out}/lib"
# "--with-tests" # disabled since upstream tests fail (Net/TestFaceUri/ParseDev Bug #3896)
];
doCheck = false; # disabled since upstream tests fail (Net/TestFaceUri/ParseDev Bug #3896)
checkPhase = ''
runHook preCheck
LD_PRELOAD=build/ndn-cxx.so build/unit-tests
runHook postCheck
'';
meta = with lib; {
homepage = "https://named-data.net/";
description = "A Named Data Neworking (NDN) or Content Centric Networking (CCN) abstraction";
@ -49,6 +59,6 @@ stdenv.mkDerivation rec {
'';
license = licenses.lgpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ sjmackenzie ];
maintainers = with maintainers; [ sjmackenzie bertof ];
};
}

@ -1,6 +1,6 @@
{ lib
, stdenv
, boost
, boost175
, fetchFromGitHub
, libpcap
, ndn-cxx
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
owner = "named-data";
repo = lib.toUpper pname;
rev = "NFD-${version}";
sha256 = "1l9bchj8c68r6qw4vr1kc96jgxl0vpqa2vjkvy1xmhz92sivr6gi";
sha256 = "sha256-8Zm8oxbpw9qD31NuofDdgPYnTWIz5E04NhkZhiRkK9E=";
fetchSubmodules = true;
};
@ -30,8 +30,8 @@ stdenv.mkDerivation rec {
buildInputs = [ libpcap ndn-cxx openssl websocketpp ] ++ lib.optional withSystemd systemd;
wafConfigureFlags = [
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.out}/lib"
"--boost-includes=${boost175.dev}/include"
"--boost-libs=${boost175.out}/lib"
"--with-tests"
] ++ lib.optional (!withWebSocket) "--without-websocket";

@ -1,6 +1,6 @@
{ lib
, stdenv
, boost
, boost175
, fetchFromGitHub
, libpcap
, ndn-cxx
@ -18,21 +18,23 @@ stdenv.mkDerivation rec {
owner = "named-data";
repo = pname;
rev = "ndn-tools-${version}";
sha256 = "1q2d0v8srqjbvigr570qw6ia0d9f88aj26ccyxkzjjwwqdx3y4fy";
sha256 = "sha256-3hE/esOcS/ln94wZIRVCLjWgouEYnJJf3EvirNEGTeA=";
};
nativeBuildInputs = [ pkg-config sphinx wafHook ];
buildInputs = [ libpcap ndn-cxx openssl ];
wafConfigureFlags = [
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.out}/lib"
"--with-tests"
"--boost-includes=${boost175.dev}/include"
"--boost-libs=${boost175.out}/lib"
# "--with-tests"
];
doCheck = true;
doCheck = false;
checkPhase = ''
runHook preCheck
build/unit-tests
runHook postCheck
'';
meta = with lib; {

@ -15984,9 +15984,7 @@ with pkgs;
captive-browser = callPackage ../applications/networking/browsers/captive-browser { };
ndn-cxx = callPackage ../development/libraries/ndn-cxx {
boost = boost175;
};
ndn-cxx = callPackage ../development/libraries/ndn-cxx { };
ndn-tools = callPackage ../tools/networking/ndn-tools { };