summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index a670319..2c29ffa 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,11 +14,18 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
+
+ cargoBuildInputs = with pkgs; lib.optionals stdenv.isDarwin [
+ darwin.apple_sdk.frameworks.CoreServices
+ ];
+
rustlings =
pkgs.rustPlatform.buildRustPackage {
name = "rustlings";
version = "5.3.0";
+ buildInputs = cargoBuildInputs;
+
src = with pkgs.lib; cleanSourceWith {
src = self;
# a function that returns a bool determining if the path should be included in the cleaned source
@@ -42,12 +49,16 @@
in
{
devShell = pkgs.mkShell {
+ RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
+
buildInputs = with pkgs; [
cargo
rustc
rust-analyzer
rustlings
- ];
+ rustfmt
+ clippy
+ ] ++ cargoBuildInputs;
};
});
}