diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -23,18 +23,16 @@ pkgs = nixpkgs.legacyPackages.${system}; fenix = fenix-flake.packages.${system}; - rust-toolchain = fenix.combine [ - fenix.stable.cargo - fenix.stable.rustc - fenix.stable.clippy - # fenix.targets.riscv64gc-unknown-none-elf.stable.rust-std - ]; - rust = pkgs.makeRustPlatform { - cargo = rust-toolchain; - rustc = rust-toolchain; - }; - - packages = { }; + rust-toolchain = fenix.combine ( + [ + fenix.stable.cargo + fenix.stable.rustc + fenix.stable.clippy + ] + ++ (builtins.map ({ rust-target, ... }: fenix.targets.${rust-target}.stable.rust-std) ( + builtins.attrValues (import ./crates/arches.nix) + )) + ); in /* pkgsHost = import nixpkgs { @@ -117,7 +115,7 @@ */ devShells.default = pkgs.mkShell { - inputsFrom = builtins.attrValues (flake-utils.lib.flattenTree packages); + # inputsFrom = builtins.attrValues (flake-utils.lib.flattenTree packages); nativeBuildInputs = [ (pkgs.callPackage ./nix/miri.nix { inherit fenix; }) pkgs.cargo-watch @@ -128,7 +126,10 @@ # CARGO_BUILD_TARGET = "riscv64gc-unknown-none-elf"; }; - packages = flake-utils.lib.flattenTree packages; + lib = import ./crates { inherit fenix nixpkgs system; }; + packages = flake-utils.lib.flattenTree { + libkernel = import ./crates { inherit fenix nixpkgs system; }; + }; } ); } |