Multiple overrides for the same package
Opened this issue · 2 comments
TyberiusPrime commented
For I have the equivalent of
(final: prev: {
"pysam" = prev."pysam".overridePythonAttrs (
old: {
buildInputs = (builtins.trace "two" (old.builtInputs or [])) ++ [pkgs.bzip2];
nativeBuildInputs = builtins.trace "two-b" (old.nativeBuildInputs or []);
}
);
})
(final: prev: {
"pysam" = prev."pysam".overridePythonAttrs (
old: {
buildInputs = (builtins.trace "one" (old.builtInputs or [])) ++ [pkgs.zlib];
}
);
})
in my overrides, and find that it's not toking the first one.
The traces read
'one'
'two-b'
and I'd like to know if I'm holding it wrong or if this is how it's supposed to work?
heimalne commented
The trace seems weird indeed regarding the evaluation order. In order to evaluate the final pysam value we use the latest/last entry (prints "one"), but this dependes on the previous/old on, which when evaluated should print "two".
TyberiusPrime commented
Thanks @heimalne that's how I understood 'a list of overlays' should work, the 'old' in the 2nd one should be what the first one produced.