3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/freeradius/default.nix

95 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, autoreconfHook, talloc, finger_bsd, perl
, openssl
, linkOpenssl? true
, openldap
2017-01-26 02:00:26 +00:00
, withLdap ? true
, sqlite
2017-01-26 02:00:26 +00:00
, withSqlite ? true
, libpcap
, withPcap ? true
, libcap
, withCap ? true
, libmemcached
, withMemcached ? false
, hiredis
, withRedis ? false
, mysql
, withMysql ? false
, json_c
, withJson ? false
, libyubikey
, withYubikey ? false
, collectd
, withCollectd ? false
, curl
, withRest ? false
}:
2016-03-13 07:22:27 +00:00
assert withSqlite -> sqlite != null;
assert withLdap -> openldap != null;
assert withPcap -> libpcap != null;
assert withCap -> libcap != null;
assert withMemcached -> libmemcached != null;
assert withRedis -> hiredis != null;
assert withMysql -> mysql != null;
assert withYubikey -> libyubikey != null;
assert withCollectd -> collectd != null;
assert withRest -> curl != null && withJson;
2016-03-13 07:22:27 +00:00
## TODO: include windbind optionally (via samba?)
## TODO: include oracle optionally
## TODO: include ykclient optionally
with stdenv.lib;
2016-03-13 07:22:27 +00:00
stdenv.mkDerivation rec {
name = "freeradius-${version}";
freeradius: 3.0.16 -> 3.0.17 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/freeradius/versions. These checks were done: - built on NixOS - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radcrypt help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radsniff -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radlast -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radlast --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radzap -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radiusd -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radmin -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radmin --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd help’ got 0 exit code - found 3.0.17 with grep in /nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17 - directory tree listing: https://gist.github.com/0674f9c9bf80af589d86399e508dc604
2018-04-20 14:50:14 +01:00
version = "3.0.17";
2016-03-13 07:22:27 +00:00
2017-01-26 02:00:26 +00:00
src = fetchurl {
url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz";
freeradius: 3.0.16 -> 3.0.17 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/freeradius/versions. These checks were done: - built on NixOS - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radcrypt help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/smbencrypt help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radsniff -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radlast -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radlast --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radzap -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radiusd -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radmin -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/radmin --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd -h’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd --help’ got 0 exit code - ran ‘/nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17/bin/rc.radiusd help’ got 0 exit code - found 3.0.17 with grep in /nix/store/w85s8cwg1d1kblhqiqi1fqxka1lilfb5-freeradius-3.0.17 - directory tree listing: https://gist.github.com/0674f9c9bf80af589d86399e508dc604
2018-04-20 14:50:14 +01:00
sha256 = "0bc35knv46z729l4h22rirqns5v6jb0fzcffnjayhs8wjysfkfyy";
2017-01-26 02:00:26 +00:00
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ openssl talloc finger_bsd perl ]
++ optional withLdap openldap
++ optional withSqlite sqlite
++ optional withPcap libpcap
++ optional withCap libcap
++ optional withMemcached libmemcached
++ optional withRedis hiredis
++ optional withMysql mysql.connector-c
++ optional withJson json_c
++ optional withYubikey libyubikey
++ optional withCollectd collectd
++ optional withRest curl;
2016-03-13 07:22:27 +00:00
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
] ++ optional (!linkOpenssl) "--with-openssl=no";
2016-03-13 07:22:27 +00:00
postPatch = ''
substituteInPlace src/main/checkrad.in --replace "/usr/bin/finger" "${finger_bsd}/bin/finger"
'';
2016-03-13 07:22:27 +00:00
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"
];
2016-03-13 07:22:27 +00:00
outputs = [ "out" "dev" "man" "doc" ];
2016-03-13 07:22:27 +00:00
meta = with stdenv.lib; {
2017-08-25 12:57:39 +01:00
homepage = https://freeradius.org/;
2016-03-13 07:22:27 +00:00
description = "A modular, high performance free RADIUS suite";
2017-09-02 00:08:07 +01:00
license = licenses.gpl2;
maintainers = with maintainers; [ sheenobu willibutz ];
platforms = with platforms; linux;
2016-03-13 07:22:27 +00:00
};
}