freeradius: rename finger_bsd to bsd-finger

This commit is contained in:
AndersonTorres 2022-03-14 12:55:17 -03:00
parent 0562c75f4a
commit 471445a4e5

View File

@ -1,28 +1,23 @@
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, talloc, finger_bsd, perl { lib
, openssl , stdenv
, linkOpenssl? true , fetchurl
, openldap , fetchpatch
, withLdap ? true , autoreconfHook
, sqlite , bsd-finger
, withSqlite ? true , perl
, libpcap , talloc
, withPcap ? true , linkOpenssl? true, openssl
, libcap , withCap ? true, libcap
, withCap ? true , withCollectd ? false, collectd
, libmemcached , withJson ? false, json_c
, withMemcached ? false , withLdap ? true, openldap
, hiredis , withMemcached ? false, libmemcached
, withRedis ? false , withMysql ? false, libmysqlclient
, libmysqlclient , withPcap ? true, libpcap
, withMysql ? false , withRedis ? false, hiredis
, json_c , withRest ? false, curl
, withJson ? false , withSqlite ? true, sqlite
, libyubikey , withYubikey ? false, libyubikey
, withYubikey ? false
, collectd
, withCollectd ? false
, curl
, withRest ? false
}: }:
assert withSqlite -> sqlite != null; assert withSqlite -> sqlite != null;
@ -36,43 +31,38 @@ assert withYubikey -> libyubikey != null;
assert withCollectd -> collectd != null; assert withCollectd -> collectd != null;
assert withRest -> curl != null && withJson; assert withRest -> curl != null && withJson;
## TODO: include windbind optionally (via samba?)
## TODO: include oracle optionally
## TODO: include ykclient optionally
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "freeradius"; pname = "freeradius";
version = "3.0.25"; version = "3.0.25";
src = fetchurl { src = fetchurl {
url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz"; url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz";
sha256 = "SIOmi7PO5GAlNZqXwWkc5lXour/W3DwCHQDhCaL/TBA="; hash = "sha256-SIOmi7PO5GAlNZqXwWkc5lXour/W3DwCHQDhCaL/TBA=";
}; };
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ openssl talloc finger_bsd perl ] buildInputs = [ openssl talloc bsd-finger perl ]
++ optional withLdap openldap ++ lib.optional withCap libcap
++ optional withSqlite sqlite ++ lib.optional withCollectd collectd
++ optional withPcap libpcap ++ lib.optional withJson json_c
++ optional withCap libcap ++ lib.optional withLdap openldap
++ optional withMemcached libmemcached ++ lib.optional withMemcached libmemcached
++ optional withRedis hiredis ++ lib.optional withMysql libmysqlclient
++ optional withMysql libmysqlclient ++ lib.optional withPcap libpcap
++ optional withJson json_c ++ lib.optional withRedis hiredis
++ optional withYubikey libyubikey ++ lib.optional withRest curl
++ optional withCollectd collectd ++ lib.optional withSqlite sqlite
++ optional withRest curl; ++ lib.optional withYubikey libyubikey;
configureFlags = [ configureFlags = [
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
] ++ optional (!linkOpenssl) "--with-openssl=no"; ] ++ lib.optional (!linkOpenssl) "--with-openssl=no";
postPatch = '' postPatch = ''
substituteInPlace src/main/checkrad.in --replace "/usr/bin/finger" "${finger_bsd}/bin/finger" substituteInPlace src/main/checkrad.in \
--replace "/usr/bin/finger" "${bsd-finger}/bin/finger"
''; '';
# By default, freeradius will generate Diffie-Hellman parameters and # By default, freeradius will generate Diffie-Hellman parameters and
@ -99,6 +89,7 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ sheenobu willibutz fpletz lheckemann elseym ]; maintainers = with maintainers; [ sheenobu willibutz fpletz lheckemann elseym ];
platforms = with platforms; linux; platforms = with platforms; linux;
}; };
} }
## TODO: include windbind optionally (via samba?)
## TODO: include oracle optionally
## TODO: include ykclient optionally