1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

* Build ssmtp with TLS support.

* Added gnutls (but it turns out that ssmtp also builds with openssl,
  so I don't actually use it).

svn path=/nixpkgs/trunk/; revision=9604
This commit is contained in:
Eelco Dolstra 2007-11-08 17:48:52 +00:00
parent a9f02cbe6c
commit 8b3190234c
4 changed files with 42 additions and 12 deletions

View file

@ -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";
};
}

View file

@ -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;
}

View file

@ -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;

View file

@ -148,6 +148,7 @@ let {
slim
spidermonkey
splashutils
ssmtp
strace
strategoxt
strategoxtUtils