[Nix-dev] Inexplicable replaceRuntimeDependencies assertion failure
Mark Laws
mdl at 60hz.org
Sun Dec 4 01:43:53 CET 2016
In /etc/nixos/configuration.nix, I tried adding:
system = {
replaceRuntimeDependencies = with pkgs; [
({ original = man;
replacement = callPackage ./packages/tools/misc/man-db {};
})
];
};
...and in the expression for man-db, I ensured that the derivation's
name would match the original's in length, and I can confirm that this
is the case in nix-repl, but I still get an assertion failure when
running nixos-rebuild switch. The assertion is at the end of
nixpkgs/pkgs/build-support/replace-dependency.nix.
1) What could possibly be happening here, and how can I make this
work? I've used replaceRuntimeDependencies before to substitute a
newer/patched version of some package and it's worked fine (e.g. for
libc and other libraries), but I can't get this to work at all.
2) Why does the assertion even exist? Unless there's some obscure
implementation detail I'm unaware of that requires the original and
replacement derivation name lengths to be the same in order for
replaceRuntimeDependencies to be even be possible to implement within
Nix, this check is should be removed, considering that the *whole point*
of this hack is to provide a mechanism to transparently replace
derivations (i.e. subvert the hash check) in cases where rebuilding
packages depending on the derivation isn't actually necessary and would
just waste time.
Thanks,
Mark Laws
--
|v\ /\ |\ |< |_ /\ \^| //
More information about the nix-dev
mailing list