mirror of
https://github.com/icewind1991/infinitime-builder.git
synced 2026-06-03 09:34:13 +02:00
add readme
This commit is contained in:
parent
9f649d70d7
commit
7c2f3941a6
2 changed files with 50 additions and 5 deletions
40
README.md
Normal file
40
README.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# infinitime-builder
|
||||
|
||||
Build InfiniTime firmware images using [nix](https://nixos.org/).
|
||||
|
||||
## Building
|
||||
|
||||
```shell
|
||||
nix --experimental-features 'nix-command flakes' build
|
||||
```
|
||||
|
||||
The images to flash will be put into `./result`
|
||||
|
||||
(If you already have flakes enabled you can skip the `--experimental-features` bit)
|
||||
|
||||
## Customizing
|
||||
|
||||
You can customize the build image by editing `package.nix` and adding them to the `patches` array like:
|
||||
|
||||
```nix
|
||||
patches = [
|
||||
# grap the patch directly from github
|
||||
(fetchpatch {
|
||||
name = "double-click-settings.patch";
|
||||
url = "https://github.com/InfiniTimeOrg/InfiniTime/commit/d395f6f0857f082ab3e7fc66cb591b12bbd9cd65.patch";
|
||||
sha256 = "sha256-2Jng8JDTU7Zd42qD25CQNeF9dQRSLNwWq9IL+ik0ok0=";
|
||||
})
|
||||
# or from a local file (don't forget to add the patch to git before building)
|
||||
./local-patch.patch
|
||||
]
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
To change the version being build you can edit the `src` directive with a different `rev` and `hash`.
|
||||
|
||||
You can determine the correct `hash` for a revision by running
|
||||
|
||||
```shell
|
||||
nix --experimental-features 'nix-command flakes' run github:nix-community/nurl -- https://github.com/InfiniTimeOrg/InfiniTime <revision> --submodules
|
||||
```
|
||||
15
package.nix
15
package.nix
|
|
@ -9,7 +9,8 @@
|
|||
fetchzip,
|
||||
patch,
|
||||
git,
|
||||
fetchgit,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
}: let
|
||||
infinitime-nrf5-sdk = nrf5-sdk.overrideAttrs (old: {
|
||||
version = "15.3.0";
|
||||
|
|
@ -21,14 +22,18 @@
|
|||
in stdenv.mkDerivation rec {
|
||||
name = "infinitime";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/InfiniTimeOrg/InfiniTime";
|
||||
src = fetchFromGitHub {
|
||||
owner = "InfiniTimeOrg";
|
||||
repo = "InfiniTime";
|
||||
rev = "1.13.0";
|
||||
hash = "sha256-d2zW1JxoQ2j1Yezp3AeDDY7KObyqZ3N8JO4WCbV02sc=";
|
||||
deepClone = true;
|
||||
hash = "sha256-aY1G60Rb+D7iAWsqn1j4SkL+mpXT34otWvS29UFidzM=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# put your patches here
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
lv_img_conv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue