flake: Remove formatter excludes, as there are no more autogenerated files (#559)

This commit is contained in:
traxys 2023-08-28 13:53:12 +02:00 committed by GitHub
parent 5f9a56f5a7
commit b393989ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,34 +112,7 @@
};
};
};
formatter = let
# We need to exclude the plugins/_sources/* files as they are autogenerated
# nix formatter only takes a derivation so we need to make a proxy that passes
# the correct flags
excludeWrapper = {
stdenv,
alejandra,
writeShellScript,
...
}:
stdenv.mkDerivation {
pname = "alejandra-excludes";
inherit (alejandra) version;
dontUnpack = true;
dontBuild = true;
installPhase = let
script = writeShellScript "alejandra-excludes.sh" ''
${alejandra}/bin/alejandra --exclude ./plugins/_sources "$@"
'';
in ''
mkdir -p $out/bin
cp ${script} $out/bin/alejandra-excludes
'';
};
in
pkgs.callPackage excludeWrapper {};
formatter = pkgs.alejandra;
lib = import ./lib {
inherit pkgs;
inherit (pkgs) lib;