2018-02-22 12:53:10 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, openconnect, file, gawk,
|
2016-01-02 07:56:22 +00:00
|
|
|
openvpn, vpnc, glib, dbus, iptables, gnutls, polkit,
|
2016-05-03 19:03:14 +01:00
|
|
|
wpa_supplicant, readline6, pptp, ppp }:
|
2014-01-04 00:13:26 +00:00
|
|
|
|
2014-12-08 11:47:00 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "connman-${version}";
|
2017-09-05 10:58:58 +01:00
|
|
|
version = "1.35";
|
2016-05-03 19:03:14 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/network/connman/${name}.tar.xz";
|
2017-09-05 10:58:58 +01:00
|
|
|
sha256 = "1apj5j25kj7v1bsfv3nh54aiq873nfrsjfbj85p5qm3ihfwxxmv6";
|
2014-01-04 00:13:26 +00:00
|
|
|
};
|
|
|
|
|
2016-05-03 19:03:14 +01:00
|
|
|
buildInputs = [ openconnect polkit
|
|
|
|
openvpn vpnc glib dbus iptables gnutls
|
|
|
|
wpa_supplicant readline6 pptp ppp ];
|
|
|
|
|
2016-05-03 19:05:57 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig file gawk ];
|
2014-01-04 00:13:26 +00:00
|
|
|
|
2018-02-22 12:53:10 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "header-include.patch";
|
|
|
|
url = "https://git.kernel.org/pub/scm/network/connman/connman.git/patch/?id=bdfb3526466f8fb8f13d9259037d8f42c782ce24";
|
|
|
|
sha256 = "0q6ysy2xvvcmkcbw1y29x90g7g7kih7v95k1xbxdcxkras5yl8nf";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2014-01-04 00:13:26 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export WPASUPPLICANT=${wpa_supplicant}/sbin/wpa_supplicant
|
2016-05-03 19:03:14 +01:00
|
|
|
export PPPD=${ppp}/sbin/pppd
|
2016-05-03 19:05:57 +01:00
|
|
|
export AWK=${gawk}/bin/gawk
|
2014-01-04 00:13:26 +00:00
|
|
|
sed -i "s/\/usr\/bin\/file/file/g" ./configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=\${out}/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-dbusconfdir=\${out}/etc"
|
|
|
|
"--with-dbusdatadir=\${out}/usr/share"
|
|
|
|
"--disable-maintainer-mode"
|
|
|
|
"--enable-openconnect=builtin"
|
|
|
|
"--with-openconnect=${openconnect}/sbin/openconnect"
|
|
|
|
"--enable-openvpn=builtin"
|
|
|
|
"--with-openvpn=${openvpn}/sbin/openvpn"
|
|
|
|
"--enable-vpnc=builtin"
|
|
|
|
"--with-vpnc=${vpnc}/sbin/vpnc"
|
|
|
|
"--enable-session-policy-local=builtin"
|
|
|
|
"--enable-client"
|
|
|
|
"--enable-bluetooth"
|
|
|
|
"--enable-wifi"
|
|
|
|
"--enable-polkit"
|
|
|
|
"--enable-tools"
|
|
|
|
"--enable-datafiles"
|
|
|
|
"--enable-pptp"
|
2016-05-03 19:03:14 +01:00
|
|
|
"--with-pptp=${pptp}/sbin/pptp"
|
2017-12-19 10:34:11 +00:00
|
|
|
"--enable-iwd"
|
2014-01-04 00:13:26 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp ./client/connmanctl $out/sbin/connmanctl
|
|
|
|
'';
|
|
|
|
|
2016-01-02 07:56:22 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-09-22 21:55:15 +01:00
|
|
|
description = "A daemon for managing internet connections";
|
|
|
|
homepage = https://connman.net/;
|
2016-01-02 07:56:22 +00:00
|
|
|
maintainers = [ maintainers.matejc ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2014-01-04 00:13:26 +00:00
|
|
|
};
|
|
|
|
}
|