Closed noverby closed 8 months ago
Hi, thanks for the report; looking into this.
For future reference (once I set up unit tests), here is a minimal reproducer:
{
inputs.flakelight.url = "github:accelbread/flakelight";
outputs = { flakelight, ... }:
flakelight ./. {
devShells.default = { hello }: hello;
};
}
Fixed with fad306c58965fd33358c48f2b9d4931bd306cfb4 and e401f680302d4f9c353f4f08744bc69a1f903557.
The reason for the cryptic error was that the NixPkgs module system was merging the defined devshell with the built-in one. The merged function did not have named args, so callPackage did not provide args, and the merged function called the original package defs with no args.
Package definitions should not be merged since it does not make sense to do so, so fixed that by setting the merge function to mergeOneOption. Also made the built-in definition set with mkDefault, so that a user set default shell will take priority.
I'm trying to integrate flakelight with devenv, but flakelight does not seem to set
pkgs
for the default shell.E.g. this works without any issues:
But setting the devenv shell as default makes
pkgs
not be exposed:Returns error: