[Nix-dev] Inexplicable replaceRuntimeDependencies assertion failure

Mark Laws mdl at 60hz.org
Sun Dec 4 05:10:08 CET 2016


On Sun, Dec 4, 2016 at 11:58 AM, Shea Levy <shea at shealevy.com> wrote:
> I can't answer your specific case without seeing the details of man-db,
> but are you sure you want replaceRuntimeDependencies here and not
> packageOverrides? replaceRuntimeDependencies is for when you need to do
> a binary patching of a whole tree while you wait for a proper rebuild to
> finish, not general dependency changing.

Even if I give the "man-db" derivation the name "man", I run into the
problem. The relevant parts look like:

===
{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, less, gzip, xz }:

let realname = "man-db-2.7.5"; in
stdenv.mkDerivation rec {
  #name = "man-db-2.7.5";
  name = "man-1.6g"; # hack for replacing man with man-db

  src = fetchurl {
    #url = "mirror://savannah/man-db/${name}.tar.xz";
    url = "mirror://savannah/man-db/${realname}.tar.xz";
    sha256 = "056a3il7agfazac12yggcg4gf412yq34k065im0cpfxbcw6xskaw";
  };
===

The problem with using packageOverrides is that it causes many, many
unnecessary rebuilds because man is a system dependency, which in turn
causes all kinds of unrelated, unnecessary rebuilds of even things
like git that have no reason to need rebuilding. (I would suggest that
man be replaced with man-db in NixOS in general, simply because it
would allow for things like man -k to work properly, but that's a
separate discussion; at any rate, I used to put "man = man_db" in
packageOverrides in order to perform this replacement, but I wanted to
be able to avoid the avalanche of unnecessary rebuilds from source.)

Thanks,
Mark Laws

-- 
|v\ /\ |\ |< |_ /\ \^| //


More information about the nix-dev mailing list