summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix29
1 files changed, 15 insertions, 14 deletions
diff --git a/flake.nix b/flake.nix
index 5850e79..aecb62c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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; };
+ };
}
);
}