Skip to content

Commit

Permalink
add infinitime environment
Browse files Browse the repository at this point in the history
  • Loading branch information
w4tsn authored and mergify[bot] committed Mar 2, 2024
1 parent d18a762 commit cc906bf
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{ pkgs ? import <nixpkgs> {} }: {
{ pkgs ? import <nixpkgs> {}
, pkgsUnfree ? import <nixpkgs> { config = { allowUnfree = true; }; }
}: {
arduino = import ./envs/arduino/shell.nix { inherit pkgs; };
cc2538-bsl = import ./envs/cc2538-bsl/shell.nix { inherit pkgs; };
firefox = import ./envs/firefox/shell.nix { inherit pkgs; };
infinitime = import ./envs/infinitime/shell.nix { pkgs = pkgsUnfree; };
github-pages = import ./envs/github-pages/shell.nix { inherit pkgs; };
home-assistant = import ./envs/home-assistant/shell.nix { inherit pkgs; };
nannou = import ./envs/nannou/shell.nix { inherit pkgs; };
Expand Down
21 changes: 21 additions & 0 deletions envs/infinitime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# InfiniTime

Build environment for [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime/issues?q=is%3Aissue+is%3Aopen+gcc).

Note: Uses `unfree` package `nrf5-sdk`!

## Building the Project

Build instructions:

```
$ nix-shell
$ mkdir build
$ cd build
$ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=/usr -DNRF5_SDK_PATH=/usr/share/nRF5_SDK -DCMAKE_BUILD_TYPE=Release ..
$ make -j6 pinetime-app
```

Note that the `ARM_NONE_EABI_TOOLCHAIN_PATH` is just `/usr` as everything is linked there.

Further build instructions: https://github.com/InfiniTimeOrg/InfiniTime/blob/main/doc/buildAndProgram.md
24 changes: 24 additions & 0 deletions envs/infinitime/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ pkgs ? import <nixpkgs> {
config.allowUnfree = true;
}, extraPkgs ? []
}:

(pkgs.buildFHSUserEnv {
name = "infinitime-env";
targetPkgs = pkgs: with pkgs; [
gcc-arm-embedded-10
nrf5-sdk
zlib
cmake
gcc10
(python3.withPackages(python: [
python.cbor
python.intelhex
python.click
python.cryptography
python.imgtool
]))
nodePackages.lv_font_conv
] ++ extraPkgs;
multiPkgs = null;
}).env
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
in {
devShells = nixpkgs.lib.genAttrs systems (system: import ./. {
pkgs = import nixpkgs { inherit system; };
pkgsUnfree = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
});
};
}

0 comments on commit cc906bf

Please sign in to comment.