Closed jost-s closed 6 months ago
It came out of debugging a call to overrideSDK on a x86_64-darwin system on the Nix discourse, that the rust-overlay returns a nested list with libiconv as the only element. That caused the override to fail.
overrideSDK
libiconv
lib.optional takes any value and puts it into a list when the condition is met. In this case the value is wrapped in a list, so the result is a nested list.
lib.optional
nix-repl> legacyPackages.aarch64-darwin.lib.optional true "" [ "" ] nix-repl> legacyPackages.aarch64-darwin.lib.optional true [""] [ [ ... ] ]
I suggest to return a flat list instead, as is done a few lines up in the same file.
overrideSDK will be patched to handle the special case of a nested list anyway. https://github.com/NixOS/nixpkgs/pull/314167
Thanks for the catch!
It came out of debugging a call to
overrideSDK
on a x86_64-darwin system on the Nix discourse, that the rust-overlay returns a nested list withlibiconv
as the only element. That caused the override to fail.lib.optional
takes any value and puts it into a list when the condition is met. In this case the value is wrapped in a list, so the result is a nested list.I suggest to return a flat list instead, as is done a few lines up in the same file.