Fix rust flake template

This commit is contained in:
Daniel Flanagan 2023-12-19 10:41:50 -06:00
parent 74032212ae
commit a96bf2ad36
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -4,19 +4,14 @@
self,
nixpkgs,
}: let
inherit (self) outputs;
supportedSystems = ["x86_64-linux"];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
inherit system;
pkgs = import nixpkgs {inherit system;};
});
forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forEachSupportedSystem ({
pkgs,
system,
}: {
rust-development = pkgs.mkShell {
devShells = forEachSupportedSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
rust-dev = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
rustc
@ -26,7 +21,7 @@
];
};
default = forEachSupportedSystem ({system, ...}: self.outputs.${system}.rust-development);
default = outputs.devShells.${system}.rust-dev;
});
};
}