2018-03-15 04:05:11 +01:00
|
|
|
{ stdenv, fetchurl, substituteAll, openvpn, intltool, libxml2, pkgconfig, networkmanager, libsecret
|
2018-07-21 02:44:44 +02:00
|
|
|
, withGnome ? true, gnome3, kmod }:
|
2013-04-03 01:08:48 +02:00
|
|
|
|
2018-03-07 06:10:37 +01:00
|
|
|
let
|
2016-06-22 03:07:07 +02:00
|
|
|
pname = "NetworkManager-openvpn";
|
2018-07-05 19:18:07 +02:00
|
|
|
version = "1.8.4";
|
2018-03-07 06:10:37 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2013-04-03 01:08:48 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-07 06:10:37 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2018-07-05 19:18:07 +02:00
|
|
|
sha256 = "0gyrv46h9k17qym48qacq4zpxbap6hi17shn921824zm98m2bdvr";
|
2013-04-03 01:08:48 +02:00
|
|
|
};
|
|
|
|
|
2018-03-15 04:05:11 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit kmod openvpn;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-04-08 17:45:41 +02:00
|
|
|
buildInputs = [ openvpn networkmanager libsecret ]
|
2018-02-25 03:23:58 +01:00
|
|
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring
|
2015-04-08 17:45:41 +02:00
|
|
|
gnome3.networkmanagerapplet ];
|
2013-04-03 01:08:48 +02:00
|
|
|
|
2018-03-15 04:05:11 +01:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig libxml2 ];
|
2013-04-03 01:08:48 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2014-05-20 20:30:44 +02:00
|
|
|
"${if withGnome then "--with-gnome --with-gtkver=3" else "--without-gnome"}"
|
2013-05-10 22:28:31 +02:00
|
|
|
"--disable-static"
|
2015-04-08 17:45:41 +02:00
|
|
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
2013-04-03 01:08:48 +02:00
|
|
|
];
|
|
|
|
|
2018-03-07 06:10:37 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-openvpn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2013-04-03 01:08:48 +02:00
|
|
|
meta = {
|
2013-07-11 08:49:31 +02:00
|
|
|
description = "NetworkManager's OpenVPN plugin";
|
2013-04-03 01:08:48 +02:00
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
|
|
|
};
|
|
|
|
}
|