about summary refs log tree commit diff
path: root/pkgs/tools/X11/bumblebee
diff options
context:
space:
mode:
authorSpencer Whitt <me@swhitt.me>2015-11-25 10:30:07 -0500
committerSpencer Whitt <me@swhitt.me>2015-11-25 10:42:21 -0500
commit28d2ac416eb64426643d3915db81365ecae0d912 (patch)
tree33888ce796b6c29b6a55a801168e219f400929fd /pkgs/tools/X11/bumblebee
parent7ae05edcdd14f6ace83ead9bf0d114e97c89a83a (diff)
downloadnixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar.gz
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar.bz2
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar.lz
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar.xz
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.tar.zst
nixlib-28d2ac416eb64426643d3915db81365ecae0d912.zip
bumblebee: use _have not have in bash completion
Fixes #10936
Diffstat (limited to 'pkgs/tools/X11/bumblebee')
-rw-r--r--pkgs/tools/X11/bumblebee/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/X11/bumblebee/default.nix b/pkgs/tools/X11/bumblebee/default.nix
index d314c7857ea6..eaf2a8fe65e7 100644
--- a/pkgs/tools/X11/bumblebee/default.nix
+++ b/pkgs/tools/X11/bumblebee/default.nix
@@ -100,6 +100,13 @@ in stdenv.mkDerivation {
 
   patches = [ ./xopts.patch ./nvidia-conf.patch];
 
+  # the have() function is deprecated and not available to bash completions the
+  # way they are currently loaded in NixOS, so use _have. See #10936
+  patchPhase = ''
+    substituteInPlace scripts/bash_completion/bumblebee \
+      --replace "have optirun" "_have optirun"
+  '';
+
   preConfigure = ''
     # Substitute the path to the actual modinfo program in module.c.
     # Note: module.c also calls rmmod and modprobe, but those just have to