python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / tix / default.nix
blobb017b3eb6618ba51171877573ff727d923df1658
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , tcl
6 , tk
7 }:
9 tcl.mkTclDerivation {
10   version = "8.4.3";
11   pname = "tix";
12   src = fetchurl {
13      url = "mirror://sourceforge/tix/tix/8.4.3/Tix8.4.3-src.tar.gz";
14      sha256 = "1jq3dkyk9mqkj4cg7mdk5r0cclqsby9l2b7wrysi0zk5yw7h8bsn";
15   };
16   patches = [
17   (fetchpatch {
18     name = "tix-8.4.3-tcl8.5.patch";
19     url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
20     sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj";
21     })
22     # Remove duplicated definition of XLowerWindow
23     ./duplicated-xlowerwindow.patch
24   ] ++ lib.optional (tcl.release == "8.6")
25   (fetchpatch {
26     name = "tix-8.4.3-tcl8.6.patch";
27     url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
28     sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36";
29     })
30   ;
31   buildInputs = [ tk ];
32   # the configure script expects to find the location of the sources of
33   # tcl and tk in {tcl,tk}Config.sh
34   # In fact, it only needs some private headers. We copy them in
35   # the private_headers folders and trick the configure script into believing
36   # the sources are here.
37   preConfigure = ''
38     mkdir -p private_headers/generic
39     < ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh
40     < ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh
41     for i in ${tcl}/include/* ${tk.dev}/include/*; do
42       ln -s $i private_headers/generic;
43     done;
44     '';
45   addTclConfigureFlags = false;
46   configureFlags = [
47     "--with-tclconfig=."
48     "--with-tkinclude=${tk.dev}/include"
49     "--with-tkconfig=."
50     "--libdir=\${prefix}/lib"
51   ];
53   meta = with lib; {
54     description = "A widget library for Tcl/Tk";
55     homepage    = "http://tix.sourceforge.net/";
56     platforms   = platforms.all;
57     license     = with licenses; [
58       bsd2 # tix
59       gpl2 # patches from portage
60     ];
61   };