-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
I have a haskell-flake module whose output is imported from multiple haksell-flake module, and they form a diamond.
It includes settings.hmatrix-gsl.custom config like,
{
settings = {
hmatrix-gsl = ({ super, ... }: {
custom = _: super.hmatrix-gsl.override {
gsl = pkgs.symlinkJoin {
name = pkgs.gsl.name;
paths = [ pkgs.gsl.out pkgs.gsl.dev ];
buildInputs = [ pkgs.patchelf ];
postBuild = ''
cd $out/lib
mv libgsl.so .libgsl.so
patchelf --add-rpath ${pkgs.gsl}/lib \
--add-needed libgslcblas.so \
--output libgsl.so \
.libgsl.so
'';
};
};
});
};
}When the configuration of the module placed at the bottom of the diamond is evaluated, the following error occurs.
error: The option `custom.<function body>' is defined multiple times while it's expected to be unique.
Definition values:
- In `/nix/store/sqa8r0w39lrzmcbpffzg1zniiy5ir06g-source/flake.nix, via option perSystem, via option perSystem.x86_64-linux.haskellProjects.default.settings.hmatrix-gsl': <derivation hmatrix-gsl-0.19.0.1>
- In `/nix/store/sqa8r0w39lrzmcbpffzg1zniiy5ir06g-source/flake.nix, via option perSystem, via option perSystem.x86_64-linux.haskellProjects.default.settings.hmatrix-gsl': <derivation hmatrix-gsl-0.19.0.1>
I don't understand why this error occurs.
custom option's type is types.functionTo types.package and it allows multiple configurations and can merge them when the result of the function is equal, as far as I know. Do we have an extra unique constraint in the other part of the source code? Or am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels