From ef902c887abca97a7efe39f13ee87674680a47c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 31 Oct 2022 16:00:14 +0100 Subject: devShells/nuttx: improve some syntax --- devShells/nuttx.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devShells/nuttx.nix') diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix index 03f51f9..ef6e632 100644 --- a/devShells/nuttx.nix +++ b/devShells/nuttx.nix @@ -8,7 +8,7 @@ let pkgs = import nixpkgs.outPath { localSystem = system; crossSystem = { - config = if (match "armv.*" arch != null) then + config = if (hasPrefix "armv" arch) then "arm-none-eabi" + (optionalString (fpu != null) "hf") else "riscv32-none-elf"; libc = "newlib"; @@ -23,7 +23,7 @@ in pkgs.buildPackages.mkShell { kconfig-frontends genromfs xxd openocd gcc gdb - ] ++ (optionals (match "rv32.*" arch != null) [ + ] ++ (optionals (hasPrefix "rv32" arch) [ esptool ]); inputsFrom = [ default c ]; -- cgit v1.2.3