diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix new file mode 100644 index 000000000000..e2fc31283533 --- /dev/null +++ b/pkgs/development/libraries/gnutls/default.nix @@ -0,0 +1,18 @@ +{stdenv, fetchurl, libgcrypt}: + +stdenv.mkDerivation { + name = "gnutls-1.1.23"; + + src = fetchurl { + url = http://www.gnu.org/software/gnutls/releases/gnutls-1.1.23.tar.bz2; + sha256 = "0p5565rrinh1ajyphl9mljr3143mzall48vs02n3y03pv8srh7zh"; + }; + + buildInputs = [libgcrypt]; + + meta = { + description = "The GNU Transport Layer Security Library"; + homepage = http://www.gnu.org/software/gnutls/; + license = "LGPL"; + }; +} diff --git a/pkgs/tools/networking/ssmtp/default.nix b/pkgs/tools/networking/ssmtp/default.nix index 8ebdf88c262b..bdfcd3a1729c 100644 --- a/pkgs/tools/networking/ssmtp/default.nix +++ b/pkgs/tools/networking/ssmtp/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl }: +{stdenv, fetchurl, tlsSupport ? false, openssl ? null}: + +assert tlsSupport -> openssl != null; stdenv.mkDerivation { name = "ssmtp-2.61-12"; @@ -12,14 +14,18 @@ stdenv.mkDerivation { sha256 = "2eb5b2af76d220f14e5133ec4078bab531209fb2f9f8f4e780a0ab8de4818d39"; }) ]; - postConfigure = [ - "sed -e '/INSTALLED_CONFIGURATION_FILE/d' " - " -e 's|\\(DSSMTPCONFDIR.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp\\2|'" - " -e 's|\\(DCONFIGURATION_FILE.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp/ssmtp.conf\\2|'" - " -e 's|\\(DREVALIASES_FILE.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp/revaliases\\2|'" - " -e \"s| /lib| $out/lib|\" -i Makefile" - ]; + configureFlags = "${if tlsSupport then "--enable-ssl" else ""}"; + postConfigure = " + sed -e '/INSTALLED_CONFIGURATION_FILE/d' \\ + -e 's|\\(DSSMTPCONFDIR.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp\\2|' \\ + -e 's|\\(DCONFIGURATION_FILE.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp/ssmtp.conf\\2|' \\ + -e 's|\\(DREVALIASES_FILE.*\\).(.*)\\(.*$\\)|\\1/etc/ssmtp/revaliases\\2|' \\ + -e \"s| /lib| $out/lib|\" -i Makefile + substituteInPlace ssmtp.c --replace gnutls/ openssl/ --replace openssl.h ssl.h + substituteInPlace Makefile --replace /usr/lib/libgnutls-openssl.so -lssl + "; preInstall = "ensureDir $out/lib"; installTargets = [ "install" "install-sendmail" ]; postInstall = "install ssmtp.conf $out/etc/ssmtp "; + buildInputs = stdenv.lib.optional tlsSupport openssl; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 380f29a428ef..2b1480dda122 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -679,7 +679,8 @@ rec { }; ssmtp = import ../tools/networking/ssmtp { - inherit fetchurl stdenv; + inherit fetchurl stdenv openssl; + tlsSupport = true; }; su = import ../tools/misc/su { @@ -1776,6 +1777,10 @@ rec { inherit (gtkLibs) glib; }; + gnutls = import ../development/libraries/gnutls { + inherit fetchurl stdenv libgcrypt; + }; + gpgme = import ../development/libraries/gpgme { inherit fetchurl stdenv libgpgerror gnupg; }; @@ -3459,9 +3464,9 @@ rec { inherit librsvg fuse; }; - compiz_062 = compizFun { - version = "0.6.2"; - }; + compiz_062 = compizFun { + version = "0.6.2"; + }; compizFun = lib.sumArgs (assert mesaSupported; import ../applications/window-managers/compiz) { inherit lib builderDefs stringsWithDeps; diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix index 7cbbbb45e0fe..374a7206abd0 100644 --- a/pkgs/top-level/build-for-release.nix +++ b/pkgs/top-level/build-for-release.nix @@ -148,6 +148,7 @@ let { slim spidermonkey splashutils + ssmtp strace strategoxt strategoxtUtils