55 cmake ,
66 pkg-config ,
77 systemdLibs ,
8- avahi ,
98 dbus ,
109 protobuf ,
1110 jsoncpp ,
1211 boost ,
13- libnetfilter_queue ,
14- libnfnetlink ,
1512 nodejs ,
1613 bashNonInteractive ,
1714 buildNpmPackage ,
1815} :
1916let
2017 pname = "openthread-border-router" ;
21- version = "0-unstable-2025-06-12 " ;
18+ version = "2026.06.0 " ;
2219
2320 src = fetchFromGitHub {
2421 owner = "openthread" ;
2522 repo = "ot-br-posix" ;
26- rev = "thread-reference-20250612 " ;
27- hash = "sha256-lPMMLtbPu9NpDcBCZE6XID7u1maCAhkZiSDEyFq7yvg =" ;
23+ tag = "v ${ version } " ;
24+ hash = "sha256-7si62h1nXnAzEmloThCcOeY3VhfSIFV+7kWKgJywcvk =" ;
2825 fetchSubmodules = true ;
2926 } ;
3027
@@ -42,9 +39,6 @@ stdenv.mkDerivation {
4239 strictDeps = true ;
4340 __structuredAttrs = true ;
4441
45- # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
46- env . NIX_CFLAGS_COMPILE = "-O" ;
47-
4842 patches = [
4943 # Patch the firewall script so we can run it within the systemd start script
5044 ./firewall-script.patch
@@ -62,13 +56,10 @@ stdenv.mkDerivation {
6256 '' ;
6357
6458 buildInputs = [
65- avahi # TODO: upstream deprecated OTBR_MDNS=avahi after this release (https://github.com/openthread/ot-br-posix/pull/3240)
6659 systemdLibs
6760 protobuf
6861 jsoncpp
6962 boost
70- libnetfilter_queue
71- libnfnetlink
7263 dbus
7364 ( lib . getBin bashNonInteractive )
7465 ] ;
@@ -85,6 +76,9 @@ stdenv.mkDerivation {
8576 ( lib . cmakeBool "Boost_USE_STATIC_LIBS" false )
8677 ( lib . cmakeBool "OTBR_REST" true )
8778
79+ # OpenThread's built-in mDNS publisher (upstream default). No Avahi daemon needed.
80+ ( lib . cmakeFeature "OTBR_MDNS" "openthread" )
81+
8882 ( lib . cmakeBool "OTBR_WEB" true )
8983 ( lib . cmakeBool "OTBR_NAT64" true )
9084 ( lib . cmakeBool "OTBR_BACKBONE_ROUTER" true )
@@ -93,9 +87,12 @@ stdenv.mkDerivation {
9387 ( lib . cmakeBool "OTBR_TREL" true )
9488
9589 ( lib . cmakeFeature "OTBR_VERSION" version )
96- ( lib . cmakeBool "OTBR_DNSSD_DISCOVERY_PROXY" true )
97- ( lib . cmakeBool "OTBR_SRP_ADVERTISING_PROXY" true )
98- ( lib . cmakeBool "OTBR_DUA_ROUTING" true )
90+ # otbr-agent aborts on startup with "Vendor name must be set." unless a vendor
91+ # and product name are baked in at build time.
92+ ( lib . cmakeFeature "OTBR_VENDOR_NAME" "NixOS" )
93+ ( lib . cmakeFeature "OTBR_PRODUCT_NAME" "OpenThread Border Router" )
94+ # OTBR_MDNS=openthread turns on the OT-core advertising and discovery proxies by default.
95+ # The discovery proxy gives us the DNS-SD server OTBR_DNS_UPSTREAM_QUERY needs.
9996 ( lib . cmakeBool "OTBR_DNS_UPSTREAM_QUERY" true )
10097
10198 ( lib . cmakeBool "OT_CHANNEL_MANAGER" true )
0 commit comments