zephyr-nix/python.nix

27 lines
549 B
Nix
Raw Normal View History

2024-02-06 02:52:10 +00:00
{ python3
, zephyr-src
, pyproject-nix
, clang-tools
, gitlint
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
clang-format = clang-tools;
inherit gitlint;
};
};
project = pyproject-nix.lib.project.loadRequirementsTxt {
requirements = zephyr-src + "/scripts/requirements.txt";
};
in
assert project.validators.validateVersionConstraints { inherit python; } == { };
python.withPackages (project.renderers.withPackages {
inherit python;
extraPackages = ps: [ ps.west ];
})