forked from InfiniTimeOrg/InfiniTime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (47 loc) · 1.3 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
description = "Fast open-source firmware for the PineTime smartwatch with many features, written in modern C++.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
xc.url = "github:joerdav/xc";
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(final: prev: {
xc = inputs.xc.packages.x86_64-linux.xc;
})
];
};
in
{
# Development shell (nix develop)
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
xc
cmake
gcc
ccls
gcc-arm-embedded
openocd
python39
minicom
gnumake
gdb
git
cacert
];
};
# The firmware (nix build)
packages.infinitime = pkgs.callPackage ./default.nix {
gcc-arm-embedded = pkgs.gcc-arm-embedded-10;
nrf5-sdk = pkgs.callPackage ./nrf5-sdk.nix { };
};
}
);
}