anchor.diff:  
     xmodules = lib.concatStringsSep "," (map (x: "${x.out or x}/lib/xorg/modules") ([ xorgserver ] ++ lib.optional (!useNvidia) xf86videonouveau));
   
  +  modprobePatch = fetchurl {
  +    url = "https://github.com/Bumblebee-Project/Bumblebee/commit/1ada79fe5916961fc4e4917f8c63bb184908d986.patch";
  +    sha256 = "0x9qvhw6sn606dqcp3394irj6jjhw3h75k3lpbys6gha1yshgjps";
  +  };
  +  libkmodPatch = fetchurl {
  +    url = "https://github.com/Bumblebee-Project/Bumblebee/commit/deceb14cdf2c90ff64ebd1010a674305464587da.patch";
  +    sha256 = "0j2v0lncjfn2nw3324q3n69lw3yz3hah6bscc8xn9a2df2dcawj1";
  +  };
  +
   in stdenv.mkDerivation rec {
     name = "bumblebee-${version}";
   
  
positive.code: 
    # Build-time dependencies of bumblebeed and optirun.
    # Note that it has several runtime dependencies.
    buildInputs = [ libX11 glib libbsd ];
    nativeBuildInputs = [ makeWrapper pkgconfig help2man ];
  
    # The order of LDPATH is very specific: First X11 then the host
  
negative.code:     sha256 = "03p3gvx99lwlavznrpg9l7jnl1yfg2adcj8jcjj0gxp20wxp060h";
    };
  
    patches = [
      ./nixos.patch
  
      modprobePatch
      libkmodPatch
    ];
  
    # By default we don't want to use a display device
    nvidiaDeviceOptions = lib.optionalString (!useDisplayDevice) ''
  