add: export also overlay + nixpkgs in passthru of mkPython

This commit is contained in:
DavHau 2020-09-29 17:10:46 +07:00
parent 0730565673
commit 393cdb9d8f

View file

@ -295,9 +295,21 @@ rec {
py_final_with_pkgs = py_final.withPackages (ps: select_pkgs ps);
in
py_final_with_pkgs.overrideAttrs (oa: {
passthru = oa.passthru // {
machNix.overrides = all_overrides;
machNix.selectPkgs = select_pkgs;
passthru = oa.passthru // rec {
selectPkgs = select_pkgs;
pythonOverrides = all_overrides;
overlay = self: super:
let
major = elemAt (splitString "." python.version) 0;
minor = elemAt (splitString "." python.version) 1;
py_attr_name = "python${major}${minor}";
in
{
"${py_attr_name}" = super."${py_attr_name}".override {
packageOverrides = pythonOverrides;
};
};
nixpkgs = import pkgs.path { config = pkgs.config; overlays = pkgs.overlays ++ [ overlay ]; };
};
})
;