summary refs log tree commit diff
path: root/pkgs/build-support/replace-dependency.nix
Commit message (Collapse)AuthorAge
* replaceDependency: fix syntax errorAlexander Ried2016-10-28
|
* nix: Add a "dev" outputEelco Dolstra2016-04-18
| | | | | This gets rid of boehm-dev in the closure (as well as Nix's own headers).
* replace-dependency.nix: Remove unnecessary carriage return.Russell O'Connor2015-11-16
|
* replace-dependency.nix: Give attr a slightly more meaningful name of drvHashRussell O'Connor2015-11-16
|
* replace-dependency.nix: Use dynamic attrs now.Shea Levy2015-11-16
|
* replace-dependency.nix: new featureRussell O'Connor2015-11-15
| | | | When replace-dependency is given a drv that doesn't actually depend on oldDependency, then just return back the original drv but also issue a warning.
* Exponentially reduce computation time needed for replace-dependency by using ↵Russell O'Connor2014-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | memoization. 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.
* replace-dependency: Eelco has ruled, lowerCamelCase > dash-case :(Shea Levy2013-01-13
|
* replace-dependency: Better function namesShea Levy2013-01-11
|
* replace-dependency: Don't strictly require that drv, old-dependency, and ↵Shea Levy2013-01-11
| | | | new-dependency be derivations
* Remove some artifacts of a failed attempt from replace-dependencyShea Levy2013-01-11
|
* Add the replace-dependency build support function.Shea Levy2013-01-11
The use case is to do a deep replacement of a dependency without rebuilding the entire tree. For example, suppose a security hole is found in glibc and a patch released. Ideally, you'd just rebuild everything, but that takes time, space, and CPU that you might not have, so in the mean time you could build a safe version of, say, firefox with: firefox-safe = replace-dependency { drv = firefox; old-dependency = glibc; new-dependency = patched-glibc; }; Building firefox-safe will rebuild glibc, but only do a simple copy/string replacement on all other dependencies of firefox. On my system (MBP 13" mid-2012), after a new glibc had been build building firefox took around 11 seconds. See the comments in the file for more details.