feat: add external component and some test configurations
This commit is contained in:
parent
4c612fc462
commit
5b0930d616
11 changed files with 511 additions and 6 deletions
67
flake.nix
Normal file
67
flake.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
description = "EspHome Word Clock";
|
||||
inputs = {
|
||||
systems.url = "github:nix-systems/x86_64-linux";
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/22.11";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
utils.inputs.systems.follows = "systems";
|
||||
};
|
||||
outputs = { self, nixpkgs, utils, ... }: utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
|
||||
# This block here is used when running `nix develop`
|
||||
devShells.default = pkgs.mkShell rec {
|
||||
# Update the name to something that suites your project.
|
||||
name = "esphome-wordclock";
|
||||
|
||||
# build environment dependencies
|
||||
packages = with pkgs; [
|
||||
esphome
|
||||
];
|
||||
|
||||
# Setting up the environment variables you need during development.
|
||||
|
||||
# Todo figure out why I can't use clang on Asahi but can on Darwin
|
||||
# Use "clang++" for most systems but OSX Asahi requires g++ for some reason or a runtime error occurs
|
||||
shellHook = let
|
||||
# This is for an icon that is used below for the command line input below
|
||||
icon = "f121";
|
||||
in ''
|
||||
export PS1="$(echo -e '\u${icon}') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
|
||||
# export COMPILER="clang++"
|
||||
#export COMPILER="g++"
|
||||
echo "test";
|
||||
'';
|
||||
};
|
||||
# This is used when running `nix build`
|
||||
# packages.default = pkgs.llvmPackages_14.stdenv.mkDerivation rec {
|
||||
packages.default = pkgs.esphome.stdenv.mkDerivation rec {
|
||||
name = "esphome-wordclock";
|
||||
version = "2.0.0";
|
||||
src = self;
|
||||
|
||||
# buildInputs = [ pkgs.esphome ];
|
||||
|
||||
# buildPhase = "COMPILER='clang++' make";
|
||||
|
||||
# installPhase = ''
|
||||
# mkdir -p $out/bin;
|
||||
# install -t $out/bin worm
|
||||
# '';
|
||||
|
||||
# meta = with inputs.utils.lib; {
|
||||
# homepage = "https://github.com/icecreammatt/ssu-cs315-worm";
|
||||
# description = ''
|
||||
# Terminal CLI Worm Game
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
# packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
|
||||
# packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
|
||||
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue