1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
Commit graph

5 commits

Author SHA1 Message Date
Shea Levy 553e1b16f0 replace-dependency: Eelco has ruled, lowerCamelCase > dash-case :( 2013-01-13 11:15:01 -05:00
Shea Levy 96a834d42a replace-dependency: Better function names 2013-01-11 16:16:20 -05:00
Shea Levy 5dd1b8f204 replace-dependency: Don't strictly require that drv, old-dependency, and new-dependency be derivations 2013-01-11 16:13:58 -05:00
Shea Levy 779c74f795 Remove some artifacts of a failed attempt from replace-dependency 2013-01-11 16:09:07 -05:00
Shea Levy d1662d7155 Add the replace-dependency build support function.
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.
2013-01-11 14:42:09 -05:00