Package firmware
This commit is contained in:
parent
875d011690
commit
320b2635fa
@ -1,2 +1,7 @@
|
|||||||
# DynamicFrame
|
# 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
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[env:tinypico-color]
|
[platformio]
|
||||||
platform = espressif32
|
lib_dir = lib
|
||||||
board = tinypico
|
|
||||||
framework = arduino
|
; [env:tinypico-color]
|
||||||
build_flags = -DEPD7IN3F
|
; platform = espressif32
|
||||||
|
; board = tinypico
|
||||||
|
; framework = arduino
|
||||||
|
; build_flags = -DEPD7IN3F
|
||||||
|
|
||||||
[env:tinypico-16gray]
|
[env:tinypico-16gray]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
@ -11,10 +11,12 @@
|
|||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
server = pkgs.callPackage ./server { };
|
server = pkgs.callPackage ./server { };
|
||||||
|
firmware = pkgs.callPackage ./firmware { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
inherit (server) server smartcrop;
|
inherit (server) server smartcrop;
|
||||||
|
inherit firmware;
|
||||||
};
|
};
|
||||||
packages.default = server.server;
|
packages.default = server.server;
|
||||||
devShell = pkgs.callPackage ./shell.nix { };
|
devShell = pkgs.callPackage ./shell.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user