1 Add the GPS location of the prison to the drone manufacturer's no-fly area database.
2 Drape netting over the prisoner accessible courtyards.
3 Train dogs to recognise the unwanted substances and use them to guard the entrance/exit to open areas.
4 Scramble the radio frequency bands used to control the drones (using a transmitter only powerful enough to affect the prison but not surrounding areas).
5 Block the GPS signal.
6 Make fake drone deliveries of substances that are non-lethal but would force the illegitimate consumer to seek medical assistance. Repeat until they give up.