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:
commit
383676f625
2 changed files with 12 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
.direnv/
|
||||
.idea/
|
||||
/target
|
||||
.rust-toolchain
|
||||
*.act
|
||||
*.bmp
|
||||
*.jpg
|
||||
|
|
|
|||
11
flake.nix
11
flake.nix
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue