nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 58 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 boost186, 5 fetchFromGitHub, 6 libpcap, 7 ndn-cxx, 8 openssl, 9 pkg-config, 10 sphinx, 11 systemd, 12 wafHook, 13 websocketpp, 14 withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, 15 withWebSocket ? true, 16}: 17 18stdenv.mkDerivation rec { 19 pname = "nfd"; 20 version = "24.07"; 21 22 src = fetchFromGitHub { 23 owner = "named-data"; 24 repo = "NFD"; 25 rev = "NFD-${version}"; 26 hash = "sha256-HbKPO3gwQWOZf4QZE+N7tAiqsNl1GrcwE4EUGjWmf5s="; 27 }; 28 29 prePatch = lib.optional withWebSocket '' 30 ln -s ${websocketpp}/include/websocketpp websocketpp 31 ''; 32 33 nativeBuildInputs = [ 34 pkg-config 35 sphinx 36 wafHook 37 ]; 38 buildInputs = [ 39 libpcap 40 ndn-cxx 41 openssl 42 ] 43 ++ lib.optional withWebSocket websocketpp 44 ++ lib.optional withSystemd systemd; 45 wafConfigureFlags = [ 46 "--boost-includes=${boost186.dev}/include" 47 "--boost-libs=${boost186.out}/lib" 48 ] 49 ++ lib.optional (!withWebSocket) "--without-websocket"; 50 51 meta = with lib; { 52 homepage = "https://named-data.net/"; 53 description = "Named Data Networking (NDN) Forwarding Daemon"; 54 license = licenses.gpl3Plus; 55 platforms = platforms.unix; 56 maintainers = with maintainers; [ bertof ]; 57 }; 58}