mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-03 06:19:10 +03:00
python: support the tkinter.tix module
This commit is contained in:
parent
3f499d3fb9
commit
a6e3d71361
6 changed files with 27 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, readline
|
, readline
|
||||||
, sqlite
|
, sqlite
|
||||||
, tcl ? null, tk ? null, xlibsWrapper ? null, libX11 ? null, x11Support ? false
|
, tcl ? null, tk ? null, tix ? null, xlibsWrapper ? null, libX11 ? null, x11Support ? false
|
||||||
, zlib
|
, zlib
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
|
@ -150,6 +150,10 @@ in stdenv.mkDerivation {
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
|
substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
''
|
''
|
||||||
# needed for some packages, especially packages that backport
|
# needed for some packages, especially packages that backport
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, readline
|
, readline
|
||||||
, sqlite
|
, sqlite
|
||||||
, tcl ? null, tk ? null, libX11 ? null, xproto ? null, x11Support ? false
|
, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
|
||||||
, zlib
|
, zlib
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
|
@ -50,6 +50,10 @@ in stdenv.mkDerivation {
|
||||||
|
|
||||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||||
|
|
||||||
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
|
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
for i in /usr /sw /opt /pkg; do # improve purity
|
for i in /usr /sw /opt /pkg; do # improve purity
|
||||||
substituteInPlace ./setup.py --replace $i /no-such-path
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, readline
|
, readline
|
||||||
, sqlite
|
, sqlite
|
||||||
, tcl ? null, tk ? null, libX11 ? null, xproto ? null, x11Support ? false
|
, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
|
||||||
, zlib
|
, zlib
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
|
@ -55,6 +55,10 @@ in stdenv.mkDerivation {
|
||||||
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
|
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
for i in /usr /sw /opt /pkg; do # improve purity
|
for i in /usr /sw /opt /pkg; do # improve purity
|
||||||
substituteInPlace ./setup.py --replace $i /no-such-path
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, readline
|
, readline
|
||||||
, sqlite
|
, sqlite
|
||||||
, tcl ? null, tk ? null, libX11 ? null, xproto ? null, x11Support ? false
|
, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
|
||||||
, zlib
|
, zlib
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
|
@ -55,6 +55,10 @@ in stdenv.mkDerivation {
|
||||||
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
|
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
for i in /usr /sw /opt /pkg; do # improve purity
|
for i in /usr /sw /opt /pkg; do # improve purity
|
||||||
substituteInPlace ./setup.py --replace $i /no-such-path
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, readline
|
, readline
|
||||||
, sqlite
|
, sqlite
|
||||||
, tcl ? null, tk ? null, libX11 ? null, xproto ? null, x11Support ? false
|
, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
|
||||||
, zlib
|
, zlib
|
||||||
, callPackage
|
, callPackage
|
||||||
, self
|
, self
|
||||||
|
@ -55,6 +55,10 @@ in stdenv.mkDerivation {
|
||||||
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postPatch = optionalString (x11Support && (tix != null)) ''
|
||||||
|
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
for i in /usr /sw /opt /pkg; do # improve purity
|
for i in /usr /sw /opt /pkg; do # improve purity
|
||||||
substituteInPlace ./setup.py --replace $i /no-such-path
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi
|
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi
|
||||||
, sqlite, openssl, ncurses, python, expat, tcl, tk, xlibsWrapper, libX11
|
, sqlite, openssl, ncurses, python, expat, tcl, tk, tix, xlibsWrapper, libX11
|
||||||
, makeWrapper, callPackage, self, gdbm, db
|
, makeWrapper, callPackage, self, gdbm, db
|
||||||
# For the Python package set
|
# For the Python package set
|
||||||
, pkgs, packageOverrides ? (self: super: {})
|
, pkgs, packageOverrides ? (self: super: {})
|
||||||
|
@ -35,6 +35,7 @@ let
|
||||||
};
|
};
|
||||||
in ''
|
in ''
|
||||||
patch lib-python/2.7/test/test_pyexpat.py < '${expatch}'
|
patch lib-python/2.7/test/test_pyexpat.py < '${expatch}'
|
||||||
|
substituteInPlace "lib-python/2.7/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ bzip2 openssl pkgconfig python libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ]
|
buildInputs = [ bzip2 openssl pkgconfig python libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue