InfiniTime/shell.nix

51 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2024-06-07 23:46:06 +00:00
{ pkgs ? import <nixpkgs> {} }:
with pkgs; let
py4McuBoot = python3.withPackages (ps: with ps; [
cbor
intelhex
click
cryptography
pillow
]);
lv_img_convWrapper = pkgs.writeScriptBin "lv_img_conv" ''
npm install lv_img_conv
nodejs node_modules/lv_img_conv/lv_img_conv.js
'';
buildInfinitime = pkgs.writeScriptBin "build-infinitime" ''
2024-06-10 03:26:43 +00:00
mkdir -p build/
2024-06-07 23:46:06 +00:00
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=$ARM_NONE_EABI_TOOLCHAIN_PATH \
-DNRF5_SDK_PATH=$NRF5_SDK_PATH \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DBUILD_DFU=$BUILD_DFU \
-DBUILD_RESOURCES=$BUILD_RESOURCES \
-DTARGET_DEVICE=$TARGET_DEVICE \
2024-06-10 03:26:43 +00:00
-S . -B build
2024-06-07 23:46:06 +00:00
cmake --build build -j6
'';
in mkShell {
packages = [
gcc-arm-embedded-10
nrf5-sdk
cmake
nodePackages.lv_font_conv
lv_img_convWrapper
# lv_img_conv
nodejs
py4McuBoot
clang-tools
SDL2
libpng
adafruit-nrfutil
buildInfinitime
# watchmate # wish this worked -- use flatpak run io.gitlab.azymohliad.WatchMate
];
ARM_NONE_EABI_TOOLCHAIN_PATH="${gcc-arm-embedded-10}";
NRF5_SDK_PATH="${nrf5-sdk}/share/nRF5_SDK";
CMAKE_BUILD_TYPE="Release";
BUILD_DFU=1;
BUILD_RESOURCES=1;
TARGET_DEVICE="PINETIME";
}