Merge pull request #1935 from offlinehacker/pkgs/pythonPackages/distutils-cfg/override_config
pythonPackages: distutils-cfg, allow to override config
This commit is contained in:
commit
afc1f7ca15
|
@ -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 a new issue