2015-05-02 13:05:32 +02:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, libgcrypt, libgpgerror, libtasn1
|
2010-04-26 10:45:23 +02:00
|
|
|
|
2015-05-02 13:05:32 +02:00
|
|
|
# Optional Dependencies
|
|
|
|
, pam ? null, libidn ? null, gnutls ? null
|
|
|
|
}:
|
|
|
|
|
2015-05-22 21:59:21 +02:00
|
|
|
with stdenv;
|
2015-05-02 13:05:32 +02:00
|
|
|
let
|
|
|
|
optPam = shouldUsePkg pam;
|
|
|
|
optLibidn = shouldUsePkg libidn;
|
|
|
|
optGnutls = shouldUsePkg gnutls;
|
|
|
|
in
|
|
|
|
with stdenv.lib;
|
2010-04-26 10:45:23 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2014-03-29 19:44:30 +01:00
|
|
|
name = "shishi-1.0.2";
|
2010-04-26 10:45:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-06-17 19:06:47 +02:00
|
|
|
url = "mirror://gnu/shishi/${name}.tar.gz";
|
2014-03-29 19:44:30 +01:00
|
|
|
sha256 = "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d";
|
2010-04-26 10:45:23 +02:00
|
|
|
};
|
|
|
|
|
2015-05-02 13:05:32 +02:00
|
|
|
# Fixes support for gcrypt 1.6+
|
|
|
|
patches = [ ./gcrypt-fix.patch ];
|
|
|
|
|
|
|
|
buildInputs = [ libgcrypt libgpgerror libtasn1 optPam optLibidn optGnutls ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
(mkOther "sysconfdir" "/etc")
|
|
|
|
(mkOther "localstatedir" "/var")
|
|
|
|
(mkEnable true "libgcrypt" null)
|
|
|
|
(mkEnable (optPam != null) "pam" null)
|
|
|
|
(mkEnable true "ipv6" null)
|
|
|
|
(mkWith (optLibidn != null) "stringprep" null)
|
|
|
|
(mkEnable (optGnutls != null) "starttls" null)
|
|
|
|
(mkEnable true "des" null)
|
|
|
|
(mkEnable true "3des" null)
|
|
|
|
(mkEnable true "aes" null)
|
|
|
|
(mkEnable true "md" null)
|
|
|
|
(mkEnable false "null" null)
|
|
|
|
(mkEnable true "arcfour" null)
|
|
|
|
];
|
2010-04-26 10:45:23 +02:00
|
|
|
|
2013-05-27 13:29:11 +02:00
|
|
|
NIX_CFLAGS_COMPILE
|
2015-05-02 13:05:32 +02:00
|
|
|
= optionalString stdenv.isDarwin "-DBIND_8_COMPAT";
|
2013-05-27 13:29:11 +02:00
|
|
|
|
2010-04-26 10:45:23 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-05-02 13:05:32 +02:00
|
|
|
installFlags = [ "sysconfdir=\${out}/etc" ];
|
|
|
|
|
|
|
|
# Fix *.la files
|
|
|
|
postInstall = ''
|
|
|
|
sed -i $out/lib/libshi{sa,shi}.la \
|
|
|
|
'' + optionalString (optLibidn != null) ''
|
|
|
|
-e 's,\(-lidn\),-L${optLibidn}/lib \1,' \
|
|
|
|
'' + optionalString (optGnutls != null) ''
|
|
|
|
-e 's,\(-lgnutls\),-L${optGnutls}/lib \1,' \
|
|
|
|
'' + ''
|
|
|
|
-e 's,\(-lgcrypt\),-L${libgcrypt}/lib \1,' \
|
|
|
|
-e 's,\(-lgpg-error\),-L${libgpgerror}/lib \1,' \
|
|
|
|
-e 's,\(-ltasn1\),-L${libtasn1}/lib \1,'
|
|
|
|
'';
|
|
|
|
|
2010-04-26 10:45:23 +02:00
|
|
|
meta = {
|
2013-05-27 13:29:11 +02:00
|
|
|
homepage = http://www.gnu.org/software/shishi/;
|
2015-05-02 13:05:32 +02:00
|
|
|
description = "An implementation of the Kerberos 5 network security system";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ bjg lovek323 wkennington ];
|
|
|
|
platforms = platforms.all;
|
2010-04-26 10:45:23 +02:00
|
|
|
};
|
|
|
|
}
|