summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorEmmanuel Roullit <eroullit@github.com>2023-02-25 17:11:43 +0100
committerGitHub <noreply@github.com>2023-02-25 17:11:43 +0100
commitfcadbfc70d578e4a993711d5a7f1737aebd6b3ce (patch)
tree897142c1904755a43aefce56695c0b8186381e69 /flake.nix
parentb653d4848a52701d2240f130ab74c158dd5d7069 (diff)
parent701b4bef51b50d1fd3bb7fbfe3cc274f2bbdcb0c (diff)
Merge branch 'rust-lang:main' into codespaces
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 15c82b7..5d48580 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,10 +14,17 @@
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.2.1";
+ version = "5.4.0";
+
+ buildInputs = cargoBuildInputs;
src = with pkgs.lib; cleanSourceWith {
src = self;
@@ -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;
};
});
}