aboutsummaryrefslogtreecommitdiff
path: root/devShells/nuttx.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-13 17:11:58 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-13 17:11:58 +0200
commit15bd5a0e017bb1635ca82e013bf6c3d070b37572 (patch)
tree0de8bfa93a46945cf47bbb3cc154238c849d200b /devShells/nuttx.nix
parentc509d9ad37194f1a92d90b06e73e34b3f866237d (diff)
downloadnixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.tar.gz
nixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.tar.bz2
nixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.zip
devShells: fix amrv6 and allow fpu to be used
Diffstat (limited to 'devShells/nuttx.nix')
-rw-r--r--devShells/nuttx.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix
index 04a057d..ed0b971 100644
--- a/devShells/nuttx.nix
+++ b/devShells/nuttx.nix
@@ -1,20 +1,23 @@
-{ nixpkgs, shellrc, system }: arch:
+{ nixpkgs, shellrc, system }:
+{ arch, fpu ? null }:
+with nixpkgs.lib;
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-riscv = import nixpkgs.outPath {
localSystem = system;
crossSystem = {
- config = "arm-none-eabi";
+ config = "arm-none-eabi" + (optionalString (fpu != null) "hf");
libc = "newlib";
gcc = {
arch = arch;
- };
+ } // (optionalAttrs (fpu != null) { fpu = fpu; });
};
};
in pkgs.mkShell {
packages = (with pkgs; [
- kconfig-frontends make cmake
+ kconfig-frontends gnumake cmake
+ openocd
]) ++ (with pkgs-riscv.buildPackages; [
gcc gdb
]);