summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 43e8824e712a0a5c3fc6f7d5afb6bd809f8acd46 (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
{
  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; };

    image = import ./build.nix { inherit pkgs teensy-core; };

    teensy-test  = image.build "teensy-test" ./test;

    teensy-ulisp = let
      ulisp-source = import ./ulisp.nix { inherit pkgs; };
    in image.build
      "teensy-ulisp"
      (pkgs.linkFarmFromDrvs "ulisp" [ ulisp-source ]);

  in {
    packages.${system} = {
      inherit teensy-core teensy-test teensy-ulisp;
    };
  };
}