summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-09-01 20:49:26 -0500
committerNathan Ringo <nathan@remexre.com>2024-09-01 20:49:26 -0500
commit8cb34498eceef231927c444507b6787128c5f0d8 (patch)
tree0fadd76c82b88d22f993d2333e56a9200f656012 /flake.nix
parent386df39c9866a4d945de46ef0dcab2363c674e0e (diff)
Move everything over to the new organization.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix35
1 files changed, 27 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index aecb62c..5990c23 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
}
);
}