forked from extern/flakelight
Fix usage of devShell packages in formatters
Formatters should have the packages from devShell.packages, though a regression caused PATH to not be set in the formatter. This fixes that issue.
This commit is contained in:
parent
db9da2b1f7
commit
981e22f851
@ -28,8 +28,13 @@ in
|
||||
(mkIf (config.formatters != null) {
|
||||
outputs.formatter = mkDefault (genSystems
|
||||
({ pkgs, lib, fd, coreutils, ... }:
|
||||
let
|
||||
packages =
|
||||
if config.devShell == null then [ ]
|
||||
else (config.devShell pkgs).packages pkgs;
|
||||
in
|
||||
pkgs.writeShellScriptBin "formatter" ''
|
||||
PATH=${lib.makeBinPath (config.devShell.packages or (_: [ ]) pkgs)}
|
||||
PATH=${lib.makeBinPath packages}
|
||||
for f in "$@"; do
|
||||
if [ -d "$f" ]; then
|
||||
${fd}/bin/fd "$f" -Htf -x "$0" &
|
||||
|
Loading…
Reference in New Issue
Block a user