allow string for python argument

This commit is contained in:
DavHau 2020-09-16 11:14:28 +07:00
parent e1341dc5fb
commit 73d1769db6

View file

@ -169,6 +169,10 @@ rec {
}:
with builtins;
let
python_arg = python;
in
let
python = if isString python_arg then pkgs."${python_arg}" else python_arg;
src = get_src pass_args.src;
# Extract dependencies automatically if 'requirements' is unset
meta = extractMeta python src extras;
@ -238,6 +242,10 @@ rec {
with builtins;
with pkgs.lib;
let
python_arg = python;
in
let
python = if isString python_arg then pkgs."${python_arg}" else python_arg;
_extra_pkgs = map (p:
if isString p || isPath p then
_buildPython "buildPythonPackage" {