1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 22:33:57 +02:00

Require formatters to be packages

Because of 9b41239d8f, a formatter can
no longer be a package *or* an app. So let's require it to be a
package for now.
This commit is contained in:
Eelco Dolstra 2022-04-19 20:48:13 +02:00
parent 48a467f2b9
commit c9e58aa5ff
3 changed files with 9 additions and 8 deletions

View file

@ -14,10 +14,12 @@ nix fmt --help | grep "Format"
cat << EOF > flake.nix
{
outputs = _: {
formatter.$system = {
type = "app";
program = ./fmt.simple.sh;
};
formatter.$system =
with import ./config.nix;
mkDerivation {
name = "formatter";
buildCommand = "mkdir -p \$out/bin; cp \${./fmt.simple.sh} \$out/bin/formatter";
};
};
}
EOF