Add overlay with packages

This commit is contained in:
Artemis Tosini 2023-12-02 00:57:07 +00:00
parent b0d398ca8c
commit b78b8efaac
Signed by: artemist
GPG key ID: EE5227935FE3FF18
2 changed files with 13 additions and 12 deletions

View file

@ -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 { };
};
};
}

View file

@ -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;
[