Add overlay with packages
This commit is contained in:
parent
b0d398ca8c
commit
b78b8efaac
15
flake.nix
15
flake.nix
|
@ -11,17 +11,18 @@
|
|||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ (final: prev: self.packages."${system}") ];
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
jlink = pkgs.callPackage ./packages/jlink { };
|
||||
zephyr = pkgs.callPackage ./packages/zephyr { };
|
||||
};
|
||||
|
||||
devShells = { zephyr = pkgs.callPackage ./shells/zephyr { }; };
|
||||
|
||||
formatter = pkgs.nixfmt;
|
||||
});
|
||||
packages = self.overlays.default pkgs pkgs;
|
||||
}) // {
|
||||
overlays.default = final: prev: {
|
||||
jlink = final.callPackage ./packages/jlink { };
|
||||
zephyrPackages = final.callPackage ./packages/zephyr { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ lib, mkShell, zephyr, cmake, ninja, gnumake, python3
|
||||
, toolchains ? with zephyr.toolchains; [ arm-zephyr-eabi ], enableWest ? false
|
||||
, zephyrSrc ? zephyr.src, modules ? [ ], extraPackages ? [ ], extraAttrs ? { }
|
||||
}:
|
||||
let zephyr-sdk = zephyr.sdk.override { inherit toolchains; };
|
||||
{ lib, mkShell, zephyrPackages, cmake, ninja, gnumake, python3
|
||||
, toolchains ? with zephyrPackages.toolchains; [ arm-zephyr-eabi ]
|
||||
, enableWest ? false, zephyrSrc ? zephyrPackages.src, modules ? [ ]
|
||||
, extraPackages ? [ ], extraAttrs ? { } }:
|
||||
let zephyr-sdk = zephyrPackages.sdk.override { inherit toolchains; };
|
||||
in mkShell ({
|
||||
packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs;
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue