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