Considering splicing in bscpkgs #15
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
nixpkgs callPackage uses splicing to compute from which
deps<host><target>set it should pull packages for each kind ofdeps<host><target>dependency. If we fix inputs in callPackage, splicing does not work.For example:
clangOmpss2Nodes = callPackage ./default.nix { openmp = final.openmpv; }Fixes the openmp dependency. Instead, we should always pass all possible inputs and use booleans to select the right inputs:
{stdenv, lib, openmp, openmpv, nanos6, nosv, useOpenmp, useOpenmpV, useNanos6, useNodes}I have made a simple reproducer here:
I have fixed clang derivation (MR pending to be sent), but we might need to update other derivations that use fixed stdenvs.
Thanks, I understand the problem, but not why is happening. Is this perhaps because the overrided argument loses the
__splicedattribute, then is taken as is?dfcd5b901d/pkgs/stdenv/generic/make-derivation.nix (L442)I don't think the
use*attributes are enough, as sometimes we need to override some things of the inputs of a particular derivation. I would prefer to fix the callPackage + mkDerivation problem by using the spliced package as input instead (if possible).Seems like it may be it:
Interestingly:
Given that:
dfcd5b901d/pkgs/top-level/splice.nix (L14-L17)Coud this be happening because somehow the packages don't contain the
__splicedattribute in your case?I did a quick test with bench6 and ovni, as it is easier to handle than wrapCCWith, and it seems to at least contain it:
Fixed?