2016-05-03 19:05:57 +01:00
|
|
|
{ stdenv, fetchurl, 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}";
|
2016-09-14 13:39:09 +01:00
|
|
|
version = "1.33";
|
2016-05-03 19:03:14 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/network/connman/${name}.tar.xz";
|
2016-09-14 13:39:09 +01:00
|
|
|
sha256 = "187mknq2i907gf8dz0i79359gn1qc9mryvqkcgb280d7dw1ld2dw";
|
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
|
|
|
|
|
|
|
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"
|
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; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Provides a daemon for managing internet connections";
|
2014-01-04 00:13:26 +00:00
|
|
|
homepage = "https://connman.net/";
|
2016-01-02 07:56:22 +00:00
|
|
|
maintainers = [ maintainers.matejc ];
|
2014-01-04 00:13:26 +00:00
|
|
|
# tested only on linux, might work on others also
|
2016-01-02 07:56:22 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2014-01-04 00:13:26 +00:00
|
|
|
};
|
|
|
|
}
|