@@ -67,6 +67,13 @@ in stdenv.mkDerivation rec {
6767
6868 nouveauDeviceOptions = extraNouveauDeviceOptions;
6969
70+ # the have() function is deprecated and not available to bash completions the
71+ # way they are currently loaded in NixOS, so use _have. See #10936
72+ patchPhase = ''
73+ substituteInPlace scripts/bash_completion/bumblebee \
74+ --replace "have optirun" "_have optirun"
75+ '';
76+
7077 preConfigure = ''
7178 # Substitute the path to the actual modinfo program in module.c.
7279 # Note: module.c also calls rmmod and modprobe, but those just have to