Skip to content

xvuko/esp-nix

Repository files navigation

ESP-NIX

Complete toolchain needed to build ESP8266 Sming applications on nix.

crosstool-ng.nix is based on xtensa-esp32-elf.nix github gist.

Design

To keep this build system simple and flexible whole Sming directory must be copied for each build. This could be optimized by linking source code and copying only build directories.

Usage

Example nix build file:

{ pkgs ? import <nixpkgs> {} }:
let
  esp-nix = import (pkgs.fetchFromGitHub {
    owner = "xvuko";
    repo = "esp-nix";
    rev = [...];
    sha256 = [...];
  }) { inherit pkgs; };
in
esp.buildSmingApplication {
  name = [...];
  src = ./.;

  SMING_RELEASE = "1";
}

Library caching

Current sming build system creates hash names for compiled libraries. This allows having cache with multiple versions of same library and speeds up recompilation. In sming.nix two samples are build in both release and debug modes to force library cache generation. When using this file with other libraries / compilation options you might want to add additional build instructions.

TODO

  • move spejsiot related tooling into spejsiot repository

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published