-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (44 loc) · 1.27 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
{
description = "Tools for developing, building and testing SQUIRREL";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
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;
overlays = [
(final: prev: {
xc = inputs.xc.packages.x86_64-linux.xc;
picotool = pkgs.callPackage ./picotool.nix {
pico-sdk = pkgs.callPackage ./pico-sdk.nix { };
};
pico-sdk = pkgs.callPackage ./pico-sdk.nix { };
})
];
};
in
{
# Development shell (nix develop)
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
xc
gcovr
cmake
gcc
ccls
gnumake
git
cacert
];
};
# The firmware (nix build)
packages.squirrel = pkgs.callPackage ./default.nix { };
checks.squirrel-tests = pkgs.callPackage ./tests.nix { };
}
);
}