[buildout]
extends =
  ../../stack/slapos.cfg
  ../defaults.cfg
  ../babeld/buildout.cfg
  ../geoip2/buildout.cfg
  ../openvpn/buildout.cfg
  ../python-cryptography/buildout.cfg
  ../python-PyYAML/buildout.cfg
  ../python-pim-dm/buildout.cfg

parts =
  re6stnet

[python3]
<= python3.11

[gcc]
min_version = 0

[re6stnet]
recipe = zc.recipe.egg
eggs =
  ${maxminddb-python:egg}
  ${python-cffi:egg}
  ${python-cryptography:egg}
  ${python-PyYAML:egg}
  ${python-pim-dm:egg}
  pyOpenSSL
  re6stnet[geoip]

# Note: For now original PATH is appended to the end, as not all tools are
#       provided by SlapOS
initialization =
  import os
  os.environ['GEOIP2_MMDB'] = "${geolite2-country:location}/GeoLite2-Country.mmdb"
  os.environ['PATH'] = "${openvpn:location}/sbin:${babeld:location}/bin:${openssl:location}/bin:${python:location}/bin:" + os.environ.get('PATH', '/usr/sbin:/usr/bin:/sbin:/bin')
