From 28a725fcbed7e6360734e1701d76d2e294b742f5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:08:37 +0200 Subject: [PATCH 01/14] bwidget/tcllib/tcltls: Add libPrefix attributes. This is what I forgot in the packages I have added a few months ago, so it's time to revisit them and improve things, like for example set the right libPrefix in order to stay consistent with other TCL libraries. In addition this fixes some whitespace ugliness in the affected packages. Signed-off-by: aszlig --- .../networking/instant-messengers/tkabber/default.nix | 4 ++-- pkgs/development/libraries/bwidget/default.nix | 10 +++++++--- pkgs/development/libraries/tcllib/default.nix | 6 +++++- pkgs/development/libraries/tcltls/default.nix | 6 +++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 30c91d3d905..6014f582467 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -26,10 +26,10 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram $out/bin/tkabber --set TCLLIBPATH "${bwidget}/tcltk\ ${tcllib}/lib/tcllib${tcllib.version}\ ${tcltls}/lib/tls${tcltls.version}" + wrapProgram $out/bin/tkabber --set TCLLIBPATH "${bwidget}/lib/${bwidget.libPrefix}\ ${tcllib}/lib/${tcllib.libPrefix}\ ${tcltls}/lib/${tcltls.libPrefix}" ''; - buildInputs = [tcl tk tcllib tcltls bwidget x11 makeWrapper]; + buildInputs = [ tcl tk tcllib tcltls bwidget x11 makeWrapper ]; meta = { homepage = "http://tkabber.jabber.ru/"; diff --git a/pkgs/development/libraries/bwidget/default.nix b/pkgs/development/libraries/bwidget/default.nix index 693e0587a0b..b8aed94bb0b 100644 --- a/pkgs/development/libraries/bwidget/default.nix +++ b/pkgs/development/libraries/bwidget/default.nix @@ -12,9 +12,13 @@ stdenv.mkDerivation rec { dontBuild = true; installPhase = '' - ensureDir "$out/tcltk" - cp -R *.tcl lang images "$out/tcltk/" + ensureDir "$out/lib/${passthru.libPrefix}" + cp -R *.tcl lang images "$out/lib/${passthru.libPrefix}" ''; - buildInputs = [tcl]; + passthru = { + libPrefix = "bwidget${version}"; + }; + + buildInputs = [ tcl ]; } diff --git a/pkgs/development/libraries/tcllib/default.nix b/pkgs/development/libraries/tcllib/default.nix index fcfbbe19d94..6aec229f529 100644 --- a/pkgs/development/libraries/tcllib/default.nix +++ b/pkgs/development/libraries/tcllib/default.nix @@ -9,5 +9,9 @@ stdenv.mkDerivation rec { sha256 = "11052fgfmv9vyswzjjgfvh3pi0k3fnfnl9ri6nl4vc6f6z5ry56x"; }; - buildInputs = [tcl]; + passthru = { + libPrefix = "tcllib${version}"; + }; + + buildInputs = [ tcl ]; } diff --git a/pkgs/development/libraries/tcltls/default.nix b/pkgs/development/libraries/tcltls/default.nix index dbbfc3d3855..3f984c377dd 100644 --- a/pkgs/development/libraries/tcltls/default.nix +++ b/pkgs/development/libraries/tcltls/default.nix @@ -17,5 +17,9 @@ stdenv.mkDerivation rec { sha256 = "adec50143a9ad634a671d24f7c7bbf2455487eb5f12d290f41797c32a98b93f3"; }; - buildInputs = [tcl openssl]; + passthru = { + libPrefix = "tls${version}"; + }; + + buildInputs = [ tcl openssl ]; } From 882289a583c11ec38d64d4509431e81a42b95177 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:20:31 +0200 Subject: [PATCH 02/14] tclgpg: New package, pre-1.0 release. The library has not been released so far, but it is used by Tkabber and some other software in Tcl (none of them is in nixpkgs so far). Signed-off-by: aszlig --- pkgs/development/libraries/tclgpg/default.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/libraries/tclgpg/default.nix diff --git a/pkgs/development/libraries/tclgpg/default.nix b/pkgs/development/libraries/tclgpg/default.nix new file mode 100644 index 00000000000..d8bea7f14e3 --- /dev/null +++ b/pkgs/development/libraries/tclgpg/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchsvn, autoconf, automake, tcl, tcllib, gnupg }: + +stdenv.mkDerivation rec { + name = "tclgpg-${version}"; + version = "1.0pre"; + + src = fetchsvn { + url = "http://tclgpg.googlecode.com/svn/trunk"; + rev = 74; + sha256 = "5207b1d246fea6d4527e8c044579dae45a2e31eeaa5633f4f97c7e7b54ec27c5"; + }; + + configureFlags = "--with-tcl=" + tcl + "/lib " + + "--with-tclinclude=" + tcl + "/include "; + + preConfigure = '' + configureFlags="--exec_prefix=$prefix $configureFlags" + sed -i -e 's|dtplite|TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}" &|' Makefile.in + autoreconf -vfi + ''; + + prePatch = '' + sed -i -e 's|\[auto_execok gpg\]|"${gnupg}/bin/gpg2"|' tclgpg.tcl + ''; + + passthru = { + libPrefix = "gpg1.0"; + }; + + buildInputs = [ autoconf automake tcl tcllib ]; + + meta = { + homepage = http://code.google.com/p/tclgpg/; + description = "A Tcl interface to GNU Privacy Guard"; + license = stdenv.lib.licenses.bsd2; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c6f65ff841..4201d879ac8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4867,6 +4867,8 @@ let tclap = callPackage ../development/libraries/tclap {}; + tclgpg = callPackage ../development/libraries/tclgpg { }; + tcllib = callPackage ../development/libraries/tcllib { }; tcltls = callPackage ../development/libraries/tcltls { }; From d058ae5b0bafd2aa7a4075c9f09409b5a9a7329e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:26:37 +0200 Subject: [PATCH 03/14] tkabber: Add tclgpg to TCLLIBPATH. This ensures that Tkabber can now be used with GPG support, though as of gnupg version 2, this requires gpg-agent as well. Only if all conditions are met, an option to actually use GPG will show up in Tkabber's settings. Signed-off-by: aszlig --- .../networking/instant-messengers/tkabber/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 6014f582467..8bf7b44de9c 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, tcl, tk, tcllib, tcltls, bwidget, cacert, makeWrapper, x11 }: +{ stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg +, bwidget, cacert, makeWrapper, x11 }: stdenv.mkDerivation rec { name = "tkabber-0.11.1"; @@ -26,10 +27,10 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram $out/bin/tkabber --set TCLLIBPATH "${bwidget}/lib/${bwidget.libPrefix}\ ${tcllib}/lib/${tcllib.libPrefix}\ ${tcltls}/lib/${tcltls.libPrefix}" + wrapProgram $out/bin/tkabber --set TCLLIBPATH "${bwidget}/lib/${bwidget.libPrefix}\ ${tcllib}/lib/${tcllib.libPrefix}\ ${tcltls}/lib/${tcltls.libPrefix}\ ${tclgpg}/lib/${tclgpg.libPrefix}" ''; - buildInputs = [ tcl tk tcllib tcltls bwidget x11 makeWrapper ]; + buildInputs = [ tcl tk tcllib tcltls tclgpg bwidget x11 makeWrapper ]; meta = { homepage = "http://tkabber.jabber.ru/"; From 5d159722787ea2fab471e427306ed4b371e95576 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:41:40 +0200 Subject: [PATCH 04/14] tkabber: Clean up TCLLIBPATH generation. This should make things a lot more DRY as we now can generalize library paths by using the libPrefix attribute of each library. In addition this also cuts the line length in wrapProgram. Signed-off-by: aszlig --- .../instant-messengers/tkabber/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 8bf7b44de9c..56672dee33f 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -1,7 +1,15 @@ { stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg , bwidget, cacert, makeWrapper, x11 }: -stdenv.mkDerivation rec { +let + tclLibraries = [ bwidget tcllib tcltls tclgpg ]; + + getTclLibPath = p: "${p}/lib/${p.libPrefix}"; + + tclLibPaths = stdenv.lib.concatStringsSep " " + (map getTclLibPath tclLibraries); + +in stdenv.mkDerivation rec { name = "tkabber-0.11.1"; src = fetchurl { @@ -27,10 +35,10 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram $out/bin/tkabber --set TCLLIBPATH "${bwidget}/lib/${bwidget.libPrefix}\ ${tcllib}/lib/${tcllib.libPrefix}\ ${tcltls}/lib/${tcltls.libPrefix}\ ${tclgpg}/lib/${tclgpg.libPrefix}" + wrapProgram $out/bin/tkabber --set TCLLIBPATH '"${tclLibPaths}"' ''; - buildInputs = [ tcl tk tcllib tcltls tclgpg bwidget x11 makeWrapper ]; + buildInputs = [ tcl tk x11 makeWrapper ] ++ tclLibraries; meta = { homepage = "http://tkabber.jabber.ru/"; From 5b59bb4d2850e09272d653020ff9efe681b41d57 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:44:54 +0200 Subject: [PATCH 05/14] tkabber-plugins: Remove dependency on tkabber. The tkabber plugins really do not require a dependency on tkabber itself, so let's drop it. In addition, this also removes creating a $out/bin dir, which was left back then when creating the tkabber-plugins derivation by copy & pasting stuff from the main tkabber derivation. Signed-off-by: aszlig --- .../instant-messengers/tkabber-plugins/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix b/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix index c361f3270e6..236f03ffba6 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, tkabber}: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "tkabber-plugins-${version}"; @@ -10,9 +10,6 @@ stdenv.mkDerivation rec { }; configurePhase = '' - mkdir -p $out/bin sed -e "s@/usr/local@$out@" -i Makefile ''; - - buildInputs = [tkabber]; } From bf72d46084d6cefea3c3c131ae380dee0361e9ea Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:49:15 +0200 Subject: [PATCH 06/14] tkabber: Add missing meta.license. Signed-off-by: aszlig --- .../networking/instant-messengers/tkabber/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 56672dee33f..6d0036c39b3 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -43,5 +43,6 @@ in stdenv.mkDerivation rec { meta = { homepage = "http://tkabber.jabber.ru/"; description = "A GUI client for the XMPP (Jabber) instant messaging protocol"; + license = stdenv.lib.licenses.gpl2; }; } From e18227378a3983dc1f23cc67fc6798c3a50ebb9f Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:51:56 +0200 Subject: [PATCH 07/14] tkabber-plugins: Add missing meta attributes. Signed-off-by: aszlig --- .../instant-messengers/tkabber-plugins/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix b/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix index 236f03ffba6..b46133e433e 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber-plugins/default.nix @@ -12,4 +12,10 @@ stdenv.mkDerivation rec { configurePhase = '' sed -e "s@/usr/local@$out@" -i Makefile ''; + + meta = { + homepage = "http://tkabber.jabber.ru/tkabber-plugins"; + description = "Plugins for the Tkabber instant messenger"; + license = stdenv.lib.licenses.gpl2; + }; } From c544eb4c713caff1faa92312a2c45fa0aa3cbbcf Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 05:55:17 +0200 Subject: [PATCH 08/14] tkabber: Set the correct path to tkabber-plugins. This should now point to the path for the tkabber plugins package, which will be used as soon as the tkabber-plugins derivation is available as a symlink in the user's environment. Signed-off-by: aszlig --- .../networking/instant-messengers/tkabber/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 6d0036c39b3..3b6547a8be9 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -35,7 +35,9 @@ in stdenv.mkDerivation rec { ''; postInstall = '' - wrapProgram $out/bin/tkabber --set TCLLIBPATH '"${tclLibPaths}"' + wrapProgram $out/bin/tkabber \ + --set TCLLIBPATH '"${tclLibPaths}"' \ + --set TKABBER_SITE_PLUGINS '$HOME/.nix-profile/share/tkabber-plugins' ''; buildInputs = [ tcl tk x11 makeWrapper ] ++ tclLibraries; From 36947c89570c06630a295a4b021619a577c2a033 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:02:57 +0200 Subject: [PATCH 09/14] tkabber: Honor OPENSSL_X509_CERT_FILE. This gets rid of the dependency on cacert and ensures that Tkabber will read OPENSSL_X509_CERT_FILE whenever the sslcacertstore is not set by the user in Tkabber's options. Signed-off-by: aszlig --- .../networking/instant-messengers/tkabber/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tkabber/default.nix b/pkgs/applications/networking/instant-messengers/tkabber/default.nix index 3b6547a8be9..03a98cb2059 100644 --- a/pkgs/applications/networking/instant-messengers/tkabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/tkabber/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, tcl, tk, tcllib, tcltls, tclgpg -, bwidget, cacert, makeWrapper, x11 }: +, bwidget, makeWrapper, x11 }: let tclLibraries = [ bwidget tcllib tcltls tclgpg ]; @@ -22,7 +22,7 @@ in stdenv.mkDerivation rec { patchPhase = '' substituteInPlace login.tcl --replace \ "custom::defvar loginconf(sslcacertstore) \"\"" \ - "custom::defvar loginconf(sslcacertstore) \"${cacert}/etc/ca-bundle.crt\"" + "custom::defvar loginconf(sslcacertstore) \$env(OPENSSL_X509_CERT_FILE)" sed -i '/^if.*load_default_xrdb/,/^}$/ { s@option readfile \(\[fullpath [^]]*\]\)@option readfile "'"$out/share/doc/tkabber/examples/xrdb/${defaultTheme}.xrdb"'"@ From ce1c6fe0fd2cdd2dbfcf7e5ff85abf58d1a973d3 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:23:54 +0200 Subject: [PATCH 10/14] licenses: Add Tcl/Tk license. It is similar to the BSD license but has a few restrictions regarding government use. But as I am not a lawyer, I'm not sure if that could be merged with bsd3, so I'm listing it here separately just to be sure. Signed-off-by: aszlig --- pkgs/lib/licenses.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/lib/licenses.nix b/pkgs/lib/licenses.nix index dc88f887cc7..87f9298706e 100644 --- a/pkgs/lib/licenses.nix +++ b/pkgs/lib/licenses.nix @@ -175,6 +175,12 @@ shortName = "Proprietary"; fullName = "Proprietary (non redistributable) license"; }; + + tcltk = { + shortName = "Tcl/Tk"; + fullName = "Tcl/Tk license"; + url = http://www.tcl.tk/software/tcltk/license.html; + }; zlib = { shortName = "zlib"; From ae32dd91d4fdf83aa259e58cf2e4e36ce06ca30e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:30:44 +0200 Subject: [PATCH 11/14] tcl: Set license to licenses.tcltk. Signed-off-by: aszlig --- pkgs/development/interpreters/tcl/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/interpreters/tcl/default.nix b/pkgs/development/interpreters/tcl/default.nix index 060aa3b5a6b..48755065b99 100644 --- a/pkgs/development/interpreters/tcl/default.nix +++ b/pkgs/development/interpreters/tcl/default.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation { meta = { description = "The Tcl scription language"; homepage = http://www.tcl.tk/; + license = stdenv.lib.licenses.tcltk; }; passthru = { From bd130c34ec81a9b14c9a2d7d7f2beb610f35a26c Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:31:52 +0200 Subject: [PATCH 12/14] bwidget: Add missing meta attributes. Signed-off-by: aszlig --- pkgs/development/libraries/bwidget/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/bwidget/default.nix b/pkgs/development/libraries/bwidget/default.nix index b8aed94bb0b..31dc885bc43 100644 --- a/pkgs/development/libraries/bwidget/default.nix +++ b/pkgs/development/libraries/bwidget/default.nix @@ -21,4 +21,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ tcl ]; + + meta = { + homepage = "http://tcl.activestate.com/software/tcllib/"; + description = "The BWidget toolkit is a high-level widget set for Tcl/Tk."; + license = stdenv.lib.licenses.tcltk; + }; } From 1ca55953fc8569293f1c4841253bc40a02a5eac5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:34:50 +0200 Subject: [PATCH 13/14] tcllib: Add missing meta attributes. Signed-off-by: aszlig --- pkgs/development/libraries/tcllib/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/tcllib/default.nix b/pkgs/development/libraries/tcllib/default.nix index 6aec229f529..12bbe0914e0 100644 --- a/pkgs/development/libraries/tcllib/default.nix +++ b/pkgs/development/libraries/tcllib/default.nix @@ -14,4 +14,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ tcl ]; + + meta = { + homepage = "http://tcl.activestate.com/software/tcllib/"; + description = "Tcl-only library of standard routines for Tcl"; + license = stdenv.lib.licenses.tcltk; + }; } From 4f1b8117f33de8de4291293cdb0adb7ababd0fae Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 9 Sep 2012 06:38:25 +0200 Subject: [PATCH 14/14] tcltls: Add missing meta attributes. Signed-off-by: aszlig --- pkgs/development/libraries/tcltls/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/tcltls/default.nix b/pkgs/development/libraries/tcltls/default.nix index 3f984c377dd..278fed37514 100644 --- a/pkgs/development/libraries/tcltls/default.nix +++ b/pkgs/development/libraries/tcltls/default.nix @@ -22,4 +22,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ tcl openssl ]; + + meta = { + homepage = "http://tls.sourceforge.net/"; + description = "An OpenSSL / RSA-bsafe Tcl extension"; + license = stdenv.lib.licenses.tcltk; + }; }