chore: check commit messages
This commit is contained in:
parent
8b3baad1f8
commit
8d117a74d6
4 changed files with 135 additions and 100 deletions
39
nix/shell.nix
Normal file
39
nix/shell.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, rust-toolchain, self, ... }:
|
||||
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
name = "reddit-magnet";
|
||||
buildInputs = with pkgs; [
|
||||
cargo
|
||||
cargo-edit
|
||||
cargo-insta
|
||||
cargo-machete
|
||||
cargo-release
|
||||
cargo-sort
|
||||
diesel-cli
|
||||
git-cliff
|
||||
openssl
|
||||
pkg-config
|
||||
rustc
|
||||
rust-toolchain
|
||||
sqlfluff
|
||||
sqlite
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
libiconv
|
||||
] ++ self.checks.${pkgs.system}.pre-commit-check.enabledPackages;
|
||||
RUST_BACKTRACE = 1;
|
||||
|
||||
# Copy rust-toolchain to project directory for easy use in IntelliJ
|
||||
shellHook = ''
|
||||
if [ -L ./.rust-toolchain ] && [ "$(readlink ./.rust-toolchain)" = "${rust-toolchain}" ]; then
|
||||
echo "Rust toolchain symlink is already correct."
|
||||
else
|
||||
rm -f ./.rust-toolchain
|
||||
ln -s ${rust-toolchain} ./.rust-toolchain
|
||||
echo "Rust toolchain symlink updated."
|
||||
fi
|
||||
|
||||
${self.checks.${pkgs.system}.pre-commit-check.shellHook}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue