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