pythonPackages: distutils-cfg, allow to override config
This commit is contained in:
parent
42d7923752
commit
f7cdd1611b
@ -1,10 +1,11 @@
|
|||||||
# global distutils configuration, see http://docs.python.org/2/install/index.html#distutils-configuration-files
|
# global distutils configuration, see http://docs.python.org/2/install/index.html#distutils-configuration-files
|
||||||
|
|
||||||
{ stdenv, python, writeText, extraCfg ? "" }:
|
{ stdenv, python, writeText, extraCfg ? "", overrideCfg ? "" }:
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
distutilsCfg = writeText "distutils.cfg" ''
|
distutilsCfg = writeText "distutils.cfg" (
|
||||||
|
if overrideCfg != "" then overrideCfg else ''
|
||||||
[easy_install]
|
[easy_install]
|
||||||
|
|
||||||
# don't allow network connections during build to ensure purity
|
# don't allow network connections during build to ensure purity
|
||||||
@ -14,7 +15,7 @@ let
|
|||||||
zip_ok = 0
|
zip_ok = 0
|
||||||
|
|
||||||
${extraCfg}
|
${extraCfg}
|
||||||
'';
|
'');
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "${python.libPrefix}-distutils.cfg";
|
name = "${python.libPrefix}-distutils.cfg";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user