Compare commits

..

3 commits

Author SHA1 Message Date
Dom Rodriguez 8ca7ad9a3e
Merge c613bc7afd into 8598142c27 2024-10-13 15:14:22 +00:00
Dom Rodriguez c613bc7afd
feat: Introduce Flake for development and builds
This PR introduces a Nix flake, allowing for InfiniTime to be built as a
Flake, including a FHS development environment.

It's derived from #1850 and
c57c57f3c6.

We also introduce `flake-compat`, allowing for non-Flake Nix mahcines to
use the project as-is, both for building (`default.nix`), and
development (`shell.nix`).

Additionally, we introduce `.envrc`, meaning that with `direnv`, the Nix
Flake is activated automatically.

Fixes #1850.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2024-10-13 16:13:37 +01:00
NeroBurner 8598142c27
Remove unused submodule QCBOR (#2138)
Some checks failed
CI / build-firmware (push) Successful in 5m57s
CI / build-simulator (push) Failing after 3s
CI / get-base-ref-size (push) Has been skipped
CI / Compare build size (push) Has been skipped
The submodule isn't used anymore. Remove the submodule reference
completely.
2024-10-09 20:26:08 +02:00
4 changed files with 14 additions and 29 deletions

3
.gitmodules vendored
View file

@ -4,9 +4,6 @@
[submodule "src/libs/littlefs"]
path = src/libs/littlefs
url = https://github.com/littlefs-project/littlefs.git
[submodule "src/libs/QCBOR"]
path = src/libs/QCBOR
url = https://github.com/laurencelundblade/QCBOR.git
[submodule "src/libs/arduinoFFT"]
path = src/libs/arduinoFFT
url = https://github.com/kosme/arduinoFFT.git

View file

@ -16,11 +16,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725634671,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {

View file

@ -32,27 +32,26 @@
with pkgs; {
default = stdenv.mkDerivation rec {
name = "infinitime";
version = "1.14.1";
src = fetchFromGitHub {
owner = "InfiniTimeOrg";
repo = "InfiniTime";
rev = "1.14.1";
rev = "refs/tags/${version}";
hash = "sha256-IrsN+9LgEjgfoRR6H7FhsdLMK+GLxc41IBnSbdpwv/E=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
adafruit-nrfutil
nodePackages.lv_font_conv
patch
python3
python3.pkgs.cbor
python3.pkgs.click
python3.pkgs.cryptography
python3.pkgs.intelhex
python3.pkgs.pillow
adafruit-nrfutil
patch
git
];
postPatch = ''
@ -85,27 +84,17 @@
};
});
in
{
with pkgs; {
default =
pkgs.buildFHSUserEnv {
name = "infinitime-devenv";
# build tools
targetPkgs = pkgs: (with pkgs; [
cmake
nodePackages.lv_font_conv
python3
python3.pkgs.cbor
python3.pkgs.click
python3.pkgs.cryptography
python3.pkgs.intelhex
adafruit-nrfutil
(pkgs.writeShellScriptBin "cmake_infinitime" ''
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH="${pkgs.gcc-arm-embedded-10}" \
mkShell {
packages = [
(writeShellScriptBin "cmake_infinitime" ''
${cmake}/bin/cmake -DARM_NONE_EABI_TOOLCHAIN_PATH="${gcc-arm-embedded-10}" \
-DNRF5_SDK_PATH="${infinitime-nrf5-sdk}/share/nRF5_SDK" \
"$@"
'')
]);
ninja
] ++ self.packages.${pkgs.system}.default.nativeBuildInputs;
};
});
};

@ -1 +0,0 @@
Subproject commit 56b17bf9f74096774944bcac0829adcd887d391e