NixOS/nixpkgs — pull request #5121 by coreyoconnor (2014-11-25 04:23:20+00:00)
Title: Add primus and extend bumblebee to support 32bit/64bit multilib

Using primusrun will work as expected in a multilib environment. Even if the initial program
executes a another program of the sub architecture. Assuming the program does not modify
LD_LIBRARY_PATH inappropriately.

This does not update virtualgl for seemless multilib. I was unable to get a mixed 64/32 bit
environment to work with VirtualGL. The mechanism VirtualGL uses to inject the forwarding GL library
fails if both 32bit and 64 bit libraries were in the environment. Instead the bumblebee package
creates a optirun32 executable that can be used to run a 32bit executable with optimus on a 64 bit
host. This is not created if the host is 32bit.

For my usage the primusrun executable works as expected regardless of
32bit/64bit.