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