-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathflake.nix
70 lines (64 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "OpenBSW: A Code-first Software Platform for Automotive Microcontrollers";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
treefmt.url = "github:numtide/treefmt/v2.1.0";
};
outputs =
{
self,
nixpkgs,
flake-utils,
treefmt,
}:
(import "${nixpkgs}/lib/default.nix").attrsets.recursiveUpdate
(flake-utils.lib.eachSystem
(with flake-utils.lib.system; [
aarch64-linux
x86_64-linux
])
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
default = self.packages."${system}".referenceApp;
referenceApp = pkgs.callPackage ./nix/referenceApp.nix { };
};
devShells.default = import ./nix/shell.nix {
inherit pkgs self system;
treefmt = treefmt.packages."${system}".default;
};
}
))
(flake-utils.lib.eachSystem
(with flake-utils.lib.system; [
aarch64-linux
x86_64-linux
aarch64-darwin
x86_64-darwin
])
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
referenceApp_S32K148 = pkgs.callPackage ./nix/referenceApp_S32K148.nix { };
udstool = pkgs.callPackage ./nix/udstool.nix { };
interactiveIntegrationTests = self.checks."${system}".integrationTests.driverInteractive;
# re-export of formatters
treefmt = treefmt.packages."${system}".default;
nixfmt = pkgs.nixfmt-rfc-style;
clang-tools = pkgs.llvmPackages_17.clang-tools;
cmake-format = pkgs.cmake-format;
};
checks = {
integrationTests = import ./nix/IntegrationTests.nix { inherit pkgs self system; };
};
}
));
}