Configure a formatter for Nix.

I've choosen nixpkgs-fmt because it's the one whose output is most similar to
the current style.
This commit is contained in:
Michael Forster 2023-01-17 10:59:35 +01:00 committed by Mike Forster
parent 5b40eda47a
commit 0ddf550369

View file

@ -38,7 +38,7 @@
pname = "jujutsu"; pname = "jujutsu";
version = "unstable-${self.shortRev or "dirty"}"; version = "unstable-${self.shortRev or "dirty"}";
buildNoDefaultFeatures = true; buildNoDefaultFeatures = true;
buildFeatures = ["jujutsu-lib/legacy-thrift"]; buildFeatures = [ "jujutsu-lib/legacy-thrift" ];
src = self; src = self;
@ -50,8 +50,10 @@
}; };
}; };
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config gzip makeWrapper gzip
installShellFiles installShellFiles
makeWrapper
pkg-config
]; ];
buildInputs = [ openssl dbus sqlite ] buildInputs = [ openssl dbus sqlite ]
++ lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
@ -71,7 +73,6 @@
installShellCompletion --zsh --name _${pname} ./completions.zsh installShellCompletion --zsh --name _${pname} ./completions.zsh
''; '';
} }
) )
{ {
inherit (final.darwin.apple_sdk.frameworks) Security SystemConfiguration; inherit (final.darwin.apple_sdk.frameworks) Security SystemConfiguration;
@ -101,5 +102,6 @@
export RUST_BACKTRACE=1 export RUST_BACKTRACE=1
''; '';
}); });
formatter.${system} = pkgs.nixpkgs-fmt;
})); }));
} }