mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
flake: Remove formatter excludes, as there are no more autogenerated files (#559)
This commit is contained in:
parent
5f9a56f5a7
commit
b393989ba5
1 changed files with 1 additions and 28 deletions
29
flake.nix
29
flake.nix
|
@ -112,34 +112,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
formatter = let
|
formatter = pkgs.alejandra;
|
||||||
# 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 {};
|
|
||||||
|
|
||||||
lib = import ./lib {
|
lib = import ./lib {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue