diff --git a/containers/jug/setup_detectors.py b/containers/jug/setup_detectors.py
index c9389cc0de789eb4d751478c030c5e935bc9810c..f7ba8717b263bde253ce1e0bbcbe4252cc448920 100755
--- a/containers/jug/setup_detectors.py
+++ b/containers/jug/setup_detectors.py
@@ -105,6 +105,8 @@ if __name__ == '__main__':
                     subprocess.check_call(' '.join(cmd), shell=True)
             ## build
             cxxflags = ''
+            if os.environ['CXXFLAGS']:
+                cxxflags = os.environ['CXXFLAGS']
             if cfg.get('cxxflags'):
                 cxxflags = cfg['cxxflags']
             cmd = [
diff --git a/detectors.yaml b/detectors.yaml
index ca6506a13cb9fb0ec0a4451ece5522032f9b1e9b..a38549536b5be200e67db2c6e3ed8acd78ff2331 100644
--- a/detectors.yaml
+++ b/detectors.yaml
@@ -3,48 +3,37 @@ detectors:
     nightly:
       default: true
       version: main
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     main:
       version: main
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.01.0:
       version: 23.01.0
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.03.0:
       version: 23.03.0
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.05.0:
       version: 23.05.0
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.05.1:
       version: 23.05.1
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.05.2:
       version: 23.05.2
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.06.0:
       version: 23.06.0
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.06.1:
       version: 23.06.1
       patches:
       - https://github.com/eic/epic/pull/449.patch
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.07.0:
       version: 23.07.0
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type
     23.07.1:
       version: 23.07.1
-      cxxflags: -DDD4HEP_FIELD_TYPE_OVERRIDE=field_type