zephyr-nix/flake.nix

46 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-02-06 02:52:10 +00:00
{
description = "Build Zephyr projects on Nix";
inputs = {
2024-02-20 03:50:20 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
2024-02-06 02:52:10 +00:00
pyproject-nix.url = "github:nix-community/pyproject.nix";
pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
2024-02-06 02:52:10 +00:00
zephyr.url = "github:zephyrproject-rtos/zephyr/v3.6.0";
2024-02-06 02:52:10 +00:00
zephyr.flake = false;
};
outputs = { self, nixpkgs, zephyr, pyproject-nix }: (
let
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
in
{
2024-02-08 23:38:40 +00:00
checks = self.packages;
2024-02-06 02:52:10 +00:00
packages =
forAllSystems
2024-02-06 06:25:00 +00:00
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
builtins.removeAttrs
(pkgs.callPackage ./. {
zephyr-src = zephyr;
inherit pyproject-nix;
}) [
"override"
"overrideDerivation"
"callPackage"
"overrideScope"
"overrideScope'"
"newScope"
"packages"
]
2024-02-06 06:25:00 +00:00
);
2024-02-06 02:52:10 +00:00
}
);
}