From e6bc13ff04502066540db427780c442fe9690295 Mon Sep 17 00:00:00 2001 From: David Barroso Date: Tue, 3 Jan 2023 08:26:12 +0100 Subject: [PATCH] added common cargoBuildInputs to all flake outputs --- flake.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 3fabe0fe..4fec6acc 100644 --- a/flake.nix +++ b/flake.nix @@ -14,14 +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"; - buildInputs = with pkgs; lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreServices - ]; + buildInputs = cargoBuildInputs; src = with pkgs.lib; cleanSourceWith { src = self; @@ -53,7 +56,9 @@ rustc rust-analyzer rustlings - ]; + rustfmt + clippy + ] ++ cargoBuildInputs; }; }); }