if [ "$openbsd_version" != "${openbsd_version}" ]; then
echo "OPENBSD VERSION does not match"
exit 1
fi
./autogen.sh
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: bgpd-rde_peer.o:/build/source/src/bgpd/bgpd.h:133: multiple definition of `bgpd_process';
# bgpd-bgpd.o:/build/source/src/bgpd/bgpd.h:133: first defined here
env.NIX_CFLAGS_COMPILE="-fcommon";
meta={
description="Free implementation of the Border Gateway Protocol, Version 4. It allows ordinary machines to be used as routers exchanging routes with other systems speaking the BGP protocol";