1
1
forked from extern/flakelight
Commit Graph

8 Commits

Author SHA1 Message Date
Archit Gupta
8f33d9c4fb Fix inputs autoload with top-level follows
Previously, if the root node had follows, the autoloading code did not
work as it assumed the inputs of the root nodes were all strings and not
lists.
2024-05-22 23:44:25 -07:00
Archit Gupta
cecfafe9a4 Set defaults for inputs from flake.lock
If the `src` passed to flakelight contains a flake.lock, it will now be
read and used to set defaults for `inputs`. Explicitly passed inputs
will override this.
2024-03-10 19:26:37 -07:00
Archit Gupta
a6f3658ae9 Make mocked pkgs not depend on overlay prev stdenvs
Accessing some of the stdenvs would cause an infinite recursion. We can
continue to rely on base stdenv and also bail if any field other than
mkDerivation is used. All the stdenvs supported have a subset of the
attrs of base stdenv, so this is safe.
2024-01-21 22:22:31 -08:00
Archit Gupta
787ce03070 Support package functions without named args 2024-01-16 11:01:32 -08:00
Archit Gupta
1fc128d2aa Add more stdenvs to mocked pkg set 2024-01-15 02:02:48 -08:00
Archit Gupta
11e65b623d Fix evaluation of packages.default not using mkDerivation
The mock pkgs set passed `{}` as the value for unknown args; if a
package def tried to evaluate one, this can raise an error that can't be
caught. Replacing the default value with `throw ""` enables bailing out
if one of the fake args is accessed.
2024-01-14 23:52:48 -08:00
Archit Gupta
333a383ff0 Simplify mock builders that get name from attrs 2024-01-12 01:52:55 -08:00
Archit Gupta
99d8fc8a85 Use mocked builders to get default pkg name faster
Since evaluating pkgs is expensive, this speeds up evaluation of flakes
with `packages.default` by attempting to get the name using a pkgs set
containing only mocked builders that just return the name.
2024-01-12 00:36:36 -08:00