nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 64 lines 2.3 kB view raw
1{ 2 lib, 3 fetchurl, 4 fetchpatch, 5 tcl, 6 tk, 7}: 8 9tcl.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 # Fix incompatible function pointer conversions and implicit definition of `panic`. 25 # `panic` is just `Tcl_Panic`, but it is not defined on Darwin due to a conflict with `mach/mach.h`. 26 ./fix-clang16.patch 27 ] 28 ++ lib.optional (tcl.release == "8.6") (fetchpatch { 29 name = "tix-8.4.3-tcl8.6.patch"; 30 url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d"; 31 sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36"; 32 }); 33 buildInputs = [ tk ]; 34 # the configure script expects to find the location of the sources of 35 # tcl and tk in {tcl,tk}Config.sh 36 # In fact, it only needs some private headers. We copy them in 37 # the private_headers folders and trick the configure script into believing 38 # the sources are here. 39 preConfigure = '' 40 mkdir -p private_headers/generic 41 < ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh 42 < ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh 43 for i in ${tcl}/include/* ${tk.dev}/include/*; do 44 ln -s $i private_headers/generic; 45 done; 46 ''; 47 addTclConfigureFlags = false; 48 configureFlags = [ 49 "--with-tclconfig=." 50 "--with-tkinclude=${tk.dev}/include" 51 "--with-tkconfig=." 52 "--libdir=\${prefix}/lib" 53 ]; 54 55 meta = with lib; { 56 description = "Widget library for Tcl/Tk"; 57 homepage = "https://tix.sourceforge.net/"; 58 platforms = platforms.all; 59 license = with licenses; [ 60 bsd2 # tix 61 gpl2 # patches from portage 62 ]; 63 }; 64}