aboutsummaryrefslogtreecommitdiff
path: root/develop
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-12 12:01:56 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-12 12:01:56 +0200
commit1606d1923208d95cce19e12ee441206b13289ed5 (patch)
treec44c8fb325f207406457d517b2b0bf89553a7cc3 /develop
parentad529e360c98bf7238d7c5ce273d51d89b7e58dd (diff)
downloadnixos-personal-1606d1923208d95cce19e12ee441206b13289ed5.tar.gz
nixos-personal-1606d1923208d95cce19e12ee441206b13289ed5.tar.bz2
nixos-personal-1606d1923208d95cce19e12ee441206b13289ed5.zip
develop: add nuttx
Diffstat (limited to 'develop')
-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;
+}