60: Only depend on nixpkgs/lib. r=roberth a=shlevy
This reflects the actual requirements of the core flake-parts functionality and removes any possible confusion about where lib comes from (always flake-parts's input) vs where pkgs comes from (always the flake's nixpkgs input). Flakes which use flake-parts should only ever have to override its input in the very unlikely event of a bug in lib.
Hopefully lib will be separated into its own flake some day, which will also make this a much smaller footprint.
Co-authored-by: Shea Levy <shea@shealevy.com>
This reflects the actual requirements of the core flake-parts
functionality and removes any possible confusion about where lib comes
from (always flake-parts's input) vs where pkgs comes from (always the
flake's nixpkgs input). Flakes which use flake-parts should only ever
have to override its input in the very unlikely event of a bug in lib.
Hopefully lib will be separated into its own flake some day, which
will also make this a much smaller footprint.
56: add formatter schema r=roberth a=zimbatm
This is needed for flakes that want to support `nix fmt`.
Right now it's missing some testing as I didn't find a test framework for it.
Needed by https://github.com/numtide/treefmt/pull/169
Co-authored-by: zimbatm <zimbatm@zimbatm.com>
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
The `anything` type is too strict, because it uses `attrsOf`
internally, filtering out `mkIf` attrs and therefore evaluating
attribute values when only the names would be needed.
Furthermore, it is not safe to make assumptions about the objects
in legacyPackages, because while most attributes contain packages
or package sets, anything is allowed, so we don't know for sure how
to merge.
Fixes#52
With the pre-2.7 `defaultPackage` key, one would write
```
defaultPackage = packages.hello
```
I guess you can do the same in 2.7, but then you have two attrs in packages, which seems like it might confuse tooling:
```
packages.default = packages.hello
```
I wonder if packages.default shouldn't be a string? but then it would need validation...