2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config
|
2021-09-04 21:05:03 +01:00
|
|
|
, libgcrypt, libgpg-error, libtasn1
|
2010-04-26 09:45:23 +01:00
|
|
|
|
2015-05-02 12:05:32 +01:00
|
|
|
# Optional Dependencies
|
|
|
|
, pam ? null, libidn ? null, gnutls ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-25 16:21:13 +00:00
|
|
|
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
|
2015-05-02 12:05:32 +01:00
|
|
|
|
|
|
|
optPam = shouldUsePkg pam;
|
|
|
|
optLibidn = shouldUsePkg libidn;
|
|
|
|
optGnutls = shouldUsePkg gnutls;
|
|
|
|
in
|
2021-01-15 07:07:56 +00:00
|
|
|
with lib;
|
2010-04-26 09:45:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 22:53:02 +01:00
|
|
|
pname = "shishi";
|
|
|
|
version = "1.0.2";
|
2010-04-26 09:45:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-25 22:53:02 +01:00
|
|
|
url = "mirror://gnu/shishi/shishi-${version}.tar.gz";
|
2014-03-29 18:44:30 +00:00
|
|
|
sha256 = "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d";
|
2010-04-26 09:45:23 +01:00
|
|
|
};
|
|
|
|
|
2015-05-02 12:05:32 +01:00
|
|
|
# Fixes support for gcrypt 1.6+
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 00:46:00 +00:00
|
|
|
patches = [ ./gcrypt-fix.patch ./freebsd-unistd.patch ];
|
2015-05-02 12:05:32 +01:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-09-04 21:05:03 +01:00
|
|
|
buildInputs = [ libgcrypt libgpg-error libtasn1 optPam optLibidn optGnutls ];
|
2015-05-02 12:05:32 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2022-06-29 20:53:52 +01:00
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
(enableFeature true "libgcrypt")
|
|
|
|
(enableFeature (optPam != null) "pam")
|
|
|
|
(enableFeature true "ipv6")
|
|
|
|
(withFeature (optLibidn != null) "stringprep")
|
|
|
|
(enableFeature (optGnutls != null) "starttls")
|
|
|
|
(enableFeature true "des")
|
|
|
|
(enableFeature true "3des")
|
|
|
|
(enableFeature true "aes")
|
|
|
|
(enableFeature true "md")
|
|
|
|
(enableFeature false "null")
|
|
|
|
(enableFeature true "arcfour")
|
2015-05-02 12:05:32 +01:00
|
|
|
];
|
2010-04-26 09:45:23 +01:00
|
|
|
|
2013-05-27 12:29:11 +01:00
|
|
|
NIX_CFLAGS_COMPILE
|
2015-05-02 12:05:32 +01:00
|
|
|
= optionalString stdenv.isDarwin "-DBIND_8_COMPAT";
|
2013-05-27 12:29:11 +01:00
|
|
|
|
2010-04-26 09:45:23 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-05-02 12:05:32 +01:00
|
|
|
installFlags = [ "sysconfdir=\${out}/etc" ];
|
|
|
|
|
|
|
|
# Fix *.la files
|
|
|
|
postInstall = ''
|
|
|
|
sed -i $out/lib/libshi{sa,shi}.la \
|
|
|
|
'' + optionalString (optLibidn != null) ''
|
2015-10-11 20:59:52 +01:00
|
|
|
-e 's,\(-lidn\),-L${optLibidn.out}/lib \1,' \
|
2015-05-02 12:05:32 +01:00
|
|
|
'' + optionalString (optGnutls != null) ''
|
2015-10-07 21:24:10 +01:00
|
|
|
-e 's,\(-lgnutls\),-L${optGnutls.out}/lib \1,' \
|
2015-05-02 12:05:32 +01:00
|
|
|
'' + ''
|
2015-10-11 20:59:52 +01:00
|
|
|
-e 's,\(-lgcrypt\),-L${libgcrypt.out}/lib \1,' \
|
2021-09-04 21:05:03 +01:00
|
|
|
-e 's,\(-lgpg-error\),-L${libgpg-error.out}/lib \1,' \
|
2015-10-07 21:24:10 +01:00
|
|
|
-e 's,\(-ltasn1\),-L${libtasn1.out}/lib \1,'
|
2015-05-02 12:05:32 +01:00
|
|
|
'';
|
|
|
|
|
2010-04-26 09:45:23 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.gnu.org/software/shishi/";
|
2015-05-02 12:05:32 +01:00
|
|
|
description = "An implementation of the Kerberos 5 network security system";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-06-23 01:10:30 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2016-09-01 18:39:33 +01:00
|
|
|
platforms = platforms.linux;
|
2010-04-26 09:45:23 +01:00
|
|
|
};
|
|
|
|
}
|