diff --git a/flake.nix b/flake.nix index 35c98dd4..0c033c8a 100644 --- a/flake.nix +++ b/flake.nix @@ -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;