about summary refs log tree commit diff
path: root/third_party/nix/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/default.nix')
-rw-r--r--third_party/nix/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix
index cceb6b4f1bd5..1ab729e43af5 100644
--- a/third_party/nix/default.nix
+++ b/third_party/nix/default.nix
@@ -37,9 +37,9 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
     bison
     clang-tools
     cmake
-    pkgconfig
     libxml2
     libxslt
+    pkgconfig
     (import ./clangd.nix pkgs)
   ];
 
@@ -67,6 +67,7 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
   doInstallCheck = true;
 
   installCheckInputs = with pkgs; [
+    fd
     gtest
     rapidcheck
   ];
@@ -91,6 +92,10 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
     export NIX_DATA_DIR=$out/share
     export NIX_TEST_VAR=foo # this is required by a language test
     make test
+
+    # Ensure formatting is coherent, but do this after the rest of the
+    # tests run so that developers get all the useful feedback
+    fd . $src -e hh -e cc | xargs clang-format --dry-run --Werror
   '';
 
   preBuild = ''