Merge branch 'flake-toolchain' into 'main'

Maintain a symlink to the rust toolchain in the project root

See merge request kernald/reddit-magnet!17
This commit is contained in:
Marc Plano-Lesay 2025-05-02 06:19:05 +00:00
commit 383676f625
2 changed files with 12 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
.direnv/
.idea/
/target
.rust-toolchain
*.act
*.bmp
*.jpg

View file

@ -47,6 +47,17 @@
darwin.apple_sdk.frameworks.SystemConfiguration
];
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
'';
};
});
}