refactor: pull out flake devshells
This commit is contained in:
17
devshell/rust.nix
Normal file
17
devshell/rust.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
system
|
||||
}: let
|
||||
rustToolchain =
|
||||
if builtins.pathExists ./rust-toolchain.toml
|
||||
then pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml
|
||||
else pkgs.pkgsBuildHost.rust-bin.stable."1.81.0".default;
|
||||
in
|
||||
self.devShells.${system}.default
|
||||
// (pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
rustToolchain
|
||||
pkgs.pkg-config
|
||||
];
|
||||
})
|
||||
Reference in New Issue
Block a user