From 28d2ac416eb64426643d3915db81365ecae0d912 Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Wed, 25 Nov 2015 10:30:07 -0500 Subject: [PATCH] bumblebee: use _have not have in bash completion Fixes #10936 --- pkgs/tools/X11/bumblebee/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/X11/bumblebee/default.nix b/pkgs/tools/X11/bumblebee/default.nix index d314c7857ea..eaf2a8fe65e 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