nfd: init at 0.7.1 (#144010)

* nfd: init at version 0.7.1

- Add NFD derivation
- Link NFD derivation as a top-level package

* Applied revision suggestions

* Add fetchSubmodules

NFD uses websocket++ 0.8.1-hotfix in their stable release so that it can be built with boost 175.
ndn-cxx is built with boost 169 in nixpkgs, although it could use the newest version, so I'm matching the same version.

* Fixed tests and cleanup

* Fix typo in repo revision

* Add fetch submodules

NFD build script requires the complete websocket++ source in the build directory.
I could not build it reusing the packages websocket++.

* Call to pre and post check hooks

Co-authored-by: Ryan Burns <52847440+r-burns@users.noreply.github.com>

* Default to fetch NFD submodules

* Fix license

Co-authored-by: Ryan Burns <52847440+r-burns@users.noreply.github.com>

* Switch to lib.optional for parameter string

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Change prefix as per nix defaults

* Removed redundant prefix environment variable

* Homepage to HTTPS

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Co-authored-by: Ryan Burns <52847440+r-burns@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Filippo Berto 2021-12-03 03:06:02 +01:00 committed by GitHub
parent 3d4e35d0e6
commit 2f89af4d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,55 @@
{ lib
, stdenv
, boost
, 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}";
sha256 = "1l9bchj8c68r6qw4vr1kc96jgxl0vpqa2vjkvy1xmhz92sivr6gi";
fetchSubmodules = true;
};
nativeBuildInputs = [ pkg-config sphinx wafHook ];
buildInputs = [ libpcap ndn-cxx openssl websocketpp ] ++ lib.optional withSystemd systemd;
wafConfigureFlags = [
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.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/";
description = "Named Data Neworking (NDN) Forwarding Daemon";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = [ maintainers.bertof ];
};
}

View file

@ -15790,6 +15790,8 @@ with pkgs;
ndn-tools = callPackage ../tools/networking/ndn-tools { };
nfd = callPackage ../servers/nfd { };
cddlib = callPackage ../development/libraries/cddlib {};
cdk = callPackage ../development/libraries/cdk {};