Package firmware
This commit is contained in:
parent
875d011690
commit
320b2635fa
@ -1,2 +1,7 @@
|
||||
# DynamicFrame
|
||||
|
||||
To build go server `nix build .#server`
|
||||
|
||||
To build eink firmware `nix build --relaxed-sandbox .#firmware`
|
||||
|
||||
Eink firmware cannot build in the nix sandbox because platformio require internet access to build
|
20
firmware/default.nix
Normal file
20
firmware/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "platformio-project";
|
||||
|
||||
nativeBuildInputs = [ pkgs.platformio ];
|
||||
|
||||
src = ./.;
|
||||
|
||||
buildPhase = ''
|
||||
platformio run
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp .pio/build/*/firmware.bin $out/bin/
|
||||
'';
|
||||
|
||||
__noChroot = true;
|
||||
}
|
@ -8,11 +8,14 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:tinypico-color]
|
||||
platform = espressif32
|
||||
board = tinypico
|
||||
framework = arduino
|
||||
build_flags = -DEPD7IN3F
|
||||
[platformio]
|
||||
lib_dir = lib
|
||||
|
||||
; [env:tinypico-color]
|
||||
; platform = espressif32
|
||||
; board = tinypico
|
||||
; framework = arduino
|
||||
; build_flags = -DEPD7IN3F
|
||||
|
||||
[env:tinypico-16gray]
|
||||
platform = espressif32
|
||||
|
@ -11,10 +11,12 @@
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
server = pkgs.callPackage ./server { };
|
||||
firmware = pkgs.callPackage ./firmware { };
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
inherit (server) server smartcrop;
|
||||
inherit firmware;
|
||||
};
|
||||
packages.default = server.server;
|
||||
devShell = pkgs.callPackage ./shell.nix { };
|
||||
|
Loading…
x
Reference in New Issue
Block a user