/** Collection of locally provided Python packages. Add packages by creating a directory containing a `default.nix` file. The directory name will be used for the attribute name in package set. A package crecipe can use Python packages in its argument directly, e.g. ```nix { fetchFromGitHub, buildPythonPackage, django_4 }: { # ... } ``` */ { pkgs }: let callPackage = pkgs.lib.callPackageWith (pkgs // pkgs.python3.pkgs // extraPython3Packages); extraPython3Packages = let dir = builtins.path { path = ./.; name = "source"; }; in with builtins; listToAttrs ( map (name: { inherit name; value = callPackage (dir + "/${name}") { }; }) (attrNames (readDir dir)) ); in extraPython3Packages