python 2.7: add x11Support option
This commit is contained in:
parent
eb22e54243
commit
a3e00bf6c4
@ -1,7 +1,19 @@
|
|||||||
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, includeModules ? false
|
{ stdenv, fetchurl, self, callPackage
|
||||||
, sqlite, tcl, tk, x11, openssl, readline, db, ncurses, gdbm, libX11, self, callPackage }:
|
, bzip2, openssl
|
||||||
|
|
||||||
|
, includeModules ? false
|
||||||
|
|
||||||
|
, db, gdbm, ncurses, sqlite, readline
|
||||||
|
|
||||||
|
, tcl ? null, tk ? null, x11 ? null, libX11 ? null, x11Support ? true
|
||||||
|
, zlib ? null, zlibSupport ? true
|
||||||
|
}:
|
||||||
|
|
||||||
assert zlibSupport -> zlib != null;
|
assert zlibSupport -> zlib != null;
|
||||||
|
assert x11Support -> tcl != null
|
||||||
|
&& tk != null
|
||||||
|
&& x11 != null
|
||||||
|
&& libX11 != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -48,7 +60,11 @@ let
|
|||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
|
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
|
||||||
[ bzip2 openssl ] ++ optionals includeModules [ db openssl ncurses gdbm libX11 readline x11 tcl tk sqlite ]
|
[ bzip2 openssl ]
|
||||||
|
++ optionals includeModules (
|
||||||
|
[ db gdbm ncurses sqlite readline
|
||||||
|
] ++ optionals x11Support [ tcl tk x11 libX11 ]
|
||||||
|
)
|
||||||
++ optional zlibSupport zlib;
|
++ optional zlibSupport zlib;
|
||||||
|
|
||||||
# Build the basic Python interpreter without modules that have
|
# Build the basic Python interpreter without modules that have
|
||||||
@ -192,11 +208,15 @@ let
|
|||||||
deps = [ sqlite ];
|
deps = [ sqlite ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // optionalAttrs x11Support {
|
||||||
|
|
||||||
tkinter = buildInternalPythonModule {
|
tkinter = buildInternalPythonModule {
|
||||||
moduleName = "tkinter";
|
moduleName = "tkinter";
|
||||||
deps = [ tcl tk x11 libX11 ];
|
deps = [ tcl tk x11 libX11 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // {
|
||||||
|
|
||||||
readline = buildInternalPythonModule {
|
readline = buildInternalPythonModule {
|
||||||
moduleName = "readline";
|
moduleName = "readline";
|
||||||
internalName = "readline";
|
internalName = "readline";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user