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:
parent
48a467f2b9
commit
c9e58aa5ff
3 changed files with 9 additions and 8 deletions
10
tests/fmt.sh
10
tests/fmt.sh
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue