diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -23,6 +23,9 @@ pkgs = nixpkgs.legacyPackages.${system}; fenix = fenix-flake.packages.${system}; + arches = import ./arches.nix; + + python = pkgs.python3.withPackages (ps: [ ps.ninja ]); rust-toolchain = fenix.combine ( [ fenix.stable.cargo @@ -30,9 +33,30 @@ fenix.stable.clippy ] ++ (builtins.map ({ rust-target, ... }: fenix.targets.${rust-target}.stable.rust-std) ( - builtins.attrValues (import ./crates/arches.nix) + builtins.attrValues arches )) ); + + packages = rec { + kernel = import ./boards { + inherit + arches + libkernel + nixpkgs + pkgs + python + system + ; + }; + libkernel = import ./crates { + inherit + arches + fenix + nixpkgs + system + ; + }; + }; in /* pkgsHost = import nixpkgs { @@ -115,21 +139,16 @@ */ devShells.default = pkgs.mkShell { - # inputsFrom = builtins.attrValues (flake-utils.lib.flattenTree packages); nativeBuildInputs = [ (pkgs.callPackage ./nix/miri.nix { inherit fenix; }) pkgs.cargo-watch pkgs.qemu + python rust-toolchain - # pkgsHost.stdenv.cc.bintools.bintools ]; - # CARGO_BUILD_TARGET = "riscv64gc-unknown-none-elf"; }; - lib = import ./crates { inherit fenix nixpkgs system; }; - packages = flake-utils.lib.flattenTree { - libkernel = import ./crates { inherit fenix nixpkgs system; }; - }; + packages = flake-utils.lib.flattenTree packages; } ); } |