pkgs: fix python3Packages.sane-lib eval outside of flake (i.e. NUR)

This commit is contained in:
Colin 2023-06-26 01:25:46 +00:00
parent 8c586bd0db
commit 7aa0c5e3ea
2 changed files with 6 additions and 5 deletions

View File

@ -10,8 +10,9 @@ let
lib = pkgs.lib;
unpatched = pkgs;
pythonPackagesOverlay = py-final: py-prev: import ./python-packages {
pythonPackagesOverlayFor = pkgs: py-final: py-prev: import ./python-packages {
inherit (py-final) callPackage;
inherit pkgs;
};
final' = if final != null then final else pkgs.appendOverlays [(_: _: sane)];
sane = with final'; {
@ -103,12 +104,12 @@ let
### PYTHON PACKAGES
pythonPackagesExtensions = (unpatched.pythonPackagesExtensions or []) ++ [
pythonPackagesOverlay
(pythonPackagesOverlayFor final')
];
# when this scope's applied as an overlay pythonPackagesExtensions is propagated as desired.
# but when freestanding (e.g. NUR), it never gets plumbed into the outer pkgs, so we have to do that explicitly.
python3 = unpatched.python3.override {
packageOverrides = pythonPackagesOverlay;
packageOverrides = pythonPackagesOverlayFor final';
};
};
in sane

View File

@ -1,5 +1,5 @@
{ callPackage }:
{ callPackage, pkgs }:
{
feedsearch-crawler = callPackage ./feedsearch-crawler { };
sane-lib = (callPackage ../additional/sane-scripts { }).lib;
sane-lib = pkgs.sane-scripts.lib;
}