summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2017-01-04 20:51:33 +0100
committerGitHub <noreply@github.com>2017-01-04 20:51:33 +0100
commita3018650a3dab79a34ed24abae008ed2a3b0392e (patch)
tree323bf30d17083d29bf78035befe22f9f23610389 /pkgs/development/libraries
parent27660cfdc01c9a7481b4646285ab155cca784c38 (diff)
parenta6e3d713614da30bc75c0b9579a379e82eb3411c (diff)
downloadnixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar.gz
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar.bz2
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar.lz
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar.xz
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.tar.zst
nixpkgs-a3018650a3dab79a34ed24abae008ed2a3b0392e.zip
Merge pull request #21643 from symphorien/python-tix
Python tix module
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/tix/default.nix55
-rw-r--r--pkgs/development/libraries/tk/generic.nix1
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/libraries/tix/default.nix b/pkgs/development/libraries/tix/default.nix
new file mode 100644
index 00000000000..7e18e740227
--- /dev/null
+++ b/pkgs/development/libraries/tix/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchurl, tcl, tk, fetchpatch } :
+
+stdenv.mkDerivation rec {
+  version = "8.4.3";
+  name = "tix-${version}";
+  src = fetchurl {
+     url = "mirror://sourceforge/tix/tix/8.4.3/Tix8.4.3-src.tar.gz";
+     sha256 = "1jq3dkyk9mqkj4cg7mdk5r0cclqsby9l2b7wrysi0zk5yw7h8bsn";
+  };
+  patches = [ 
+  (fetchpatch {
+    name = "tix-8.4.3-tcl8.5.patch";
+    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
+    sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj";
+    })
+  ] ++ stdenv.lib.optional (tcl.release == "8.6")
+  (fetchpatch {
+    name = "tix-8.4.3-tcl8.6.patch";
+    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
+    sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36";
+    })
+  ;
+  buildInputs = [ tcl tk ];
+  # the configure script expects to find the location of the sources of
+  # tcl and tk in {tcl,tk}Config.sh
+  # In fact, it only needs some private headers. We copy them in 
+  # the private_headers folders and trick the configure script into believing
+  # the sources are here.
+  preConfigure = ''
+    mkdir -p private_headers/generic
+    < ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh
+    < ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh
+    for i in ${tcl}/include/* ${tk.dev}/include/*; do
+      ln -s $i private_headers/generic;
+    done;
+    '';
+  configureFlags = ''
+      --with-tclinclude=${tcl}/include
+      --with-tclconfig=.
+      --with-tkinclude=${tk.dev}/include
+      --with-tkconfig=.
+      --libdir=''${prefix}/lib
+    '';
+
+  meta = with stdenv.lib; {
+    description = "A widget library for Tcl/Tk";
+    homepage    = http://tix.sourceforge.net/;
+    platforms   = platforms.all;
+    license     = with licenses; [
+      bsd2 # tix
+      gpl2 # patches from portage
+    ];
+  };
+}
+
diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix
index 87a2edee3ca..2258f28b9c4 100644
--- a/pkgs/development/libraries/tk/generic.nix
+++ b/pkgs/development/libraries/tk/generic.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation {
 
   postInstall = ''
     ln -s $out/bin/wish* $out/bin/wish
+    cp ../{unix,generic}/*.h $out/include
   '';
 
   configureFlags = [