Skip to content

Commit e6bc13f

Browse files
committed
added common cargoBuildInputs to all flake outputs
1 parent b2df015 commit e6bc13f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

flake.nix

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@
1414
flake-utils.lib.eachDefaultSystem (system:
1515
let
1616
pkgs = nixpkgs.legacyPackages.${system};
17+
18+
cargoBuildInputs = with pkgs; lib.optionals stdenv.isDarwin [
19+
darwin.apple_sdk.frameworks.CoreServices
20+
];
21+
1722
rustlings =
1823
pkgs.rustPlatform.buildRustPackage {
1924
name = "rustlings";
2025
version = "5.2.1";
2126

22-
buildInputs = with pkgs; lib.optionals stdenv.isDarwin [
23-
darwin.apple_sdk.frameworks.CoreServices
24-
];
27+
buildInputs = cargoBuildInputs;
2528

2629
src = with pkgs.lib; cleanSourceWith {
2730
src = self;
@@ -53,7 +56,9 @@
5356
rustc
5457
rust-analyzer
5558
rustlings
56-
];
59+
rustfmt
60+
clippy
61+
] ++ cargoBuildInputs;
5762
};
5863
});
5964
}

0 commit comments

Comments
 (0)