These are wrappers for retroarch wrappers, they are needed since launching a
process from XBMC(as a display manager and probably otherwise), using
AdvancedLauncher, results in it and it's parent recieving the same gamepad
input.
These wrappers will produce no sound on XBMC and AdvancedLauncher setups not
using a sound daemon, since XBMC gets paused while still holding onto the sound
device.
This was added a long time ago, because bmp required binary 0.7.1.0
at least. But that binary is now the default and requiring a
specific binary just causes issues with setups where the end result
is to have two version of binary in the wrapped package db.
This patch makes two changes.
(1) It memoizes the computation of dependsOnOld.
(2) It replaces rewrittenDerivations with a similar memoized table rewriteMemo.
This prevents the entire tree of run-time dependencies from being traversed and instead only traverses the graph of run-time dependencies.
In the case of deep dependency changes (such as changing one's bash version for an entire NixOS system) this can lead to an exponential speedup in processing time
because shared dependencies are no longer traversed multiple times.
This patch isn't quite derivation-per-derivation equivalent to the original computation.
There are two immaterial differences.
(1) The previous version would always call upon sed to replace oldDependency with newDependency even when the store object being updated doesn't directly depend on
oldDependency.
The new version only replaceds oldDependency with newDependency when the store object being updated actually directly depends on oldDependency (which means there is
actually a hash to replace).
(2) The previous version would list the old store object as a source input of the new store object, *except* for the root derivation being updated. Because the
root derivation being updated has its actual derivation avaiable the previous verions would make the updated root derivation depend on the old derivation as a
derivation input instead of a source input.
The new version always lists the old store object as a source input, including the root derivation.