aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--develop/default.nix15
-rw-r--r--develop/nuttx.nix23
2 files changed, 36 insertions, 2 deletions
diff --git a/develop/default.nix b/develop/default.nix
index 5f880dc..421250f 100644
--- a/develop/default.nix
+++ b/develop/default.nix
@@ -1,5 +1,16 @@
-{ nixpkgs, shellrc, system }: {
+{ nixpkgs, shellrc, system }:
+let
- riscv = import ./riscv.nix { inherit nixpkgs; inherit shellrc; inherit system; };
+ callDevelop = file: import file {
+ inherit nixpkgs;
+ inherit shellrc;
+ inherit system;
+ };
+
+in {
+
+ armv6 = callDevelop ./nuttx.nix "armv6-m";
+ armv7e = callDevelop ./nuttx.nix "armv7e-m";
+ riscv = callDevelop ./riscv.nix;
}
diff --git a/develop/nuttx.nix b/develop/nuttx.nix
new file mode 100644
index 0000000..3066997
--- /dev/null
+++ b/develop/nuttx.nix
@@ -0,0 +1,23 @@
+{ nixpkgs, shellrc, system }: arch:
+let
+ pkgs = nixpkgs.legacyPackages.${system};
+ pkgs-riscv = import nixpkgs.outPath {
+ localSystem = system;
+ crossSystem = {
+ config = "arm-none-eabi";
+ libc = "newlib";
+ gcc = {
+ arch = arch;
+ };
+ };
+ };
+
+in pkgs.mkShell {
+ packages = (with pkgs; [
+ kconfig-frontends
+ ]) ++ (with pkgs-riscv.buildPackages; [
+ gcc gdb
+ ]);
+ inputsFrom = [ shellrc.packages.${system}.default ];
+ meta.platforms = nixpkgs.lib.platforms.linux;
+}