blob: a1f73e34947ff954f4e202fe05cb73831f96af73 (
plain)
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
|
{
description = "Build environment for Teensy 4.0";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-21.05;
};
outputs = { self, nixpkgs, ... }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
teensy-core = import ./core.nix { inherit pkgs; };
teensy-extras = import ./extra.nix { inherit pkgs; };
image = import ./build.nix { inherit pkgs teensy-core; };
teensy-test = image.build "teensy-test" ./test;
imageWith = libs: let
teensy-core = import ./core.nix { inherit pkgs libs; };
in (import ./build.nix { inherit pkgs teensy-core; });
teensy-ulisp = let
ulisp-source = import ./ulisp.nix { inherit pkgs; };
ulisp-deps = with teensy-extras; [ spi wire ];
in (imageWith ulisp-deps).build
"teensy-ulisp"
(pkgs.linkFarmFromDrvs "ulisp" [ ulisp-source ]);
in {
packages.${system} = {
inherit teensy-core teensy-test teensy-ulisp;
};
apps.${system} = {
flash-blink = image.flash teensy-test "blink";
flash-counter = image.flash teensy-test "counter";
flash-ulisp = image.flash teensy-ulisp "ulisp-arm";
};
custom = {
inherit image imageWith teensy-extras;
};
};
}
|