2018-10-04 15:40:30 -07:00
|
|
|
{ stdenv, fetchurl, substituteAll, openvpn, intltool, libxml2, pkgconfig, file, networkmanager, libsecret
|
2020-04-08 00:39:54 -07:00
|
|
|
, gtk3, withGnome ? true, gnome3, kmod, libnma }:
|
2013-04-02 16:08:48 -07:00
|
|
|
|
2018-03-06 21:10:37 -08:00
|
|
|
let
|
2018-08-09 06:52:38 -07:00
|
|
|
pname = "NetworkManager-openvpn";
|
2020-04-08 00:39:54 -07:00
|
|
|
version = "1.8.12";
|
2019-08-13 14:52:01 -07:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-09 06:52:38 -07:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2013-04-02 16:08:48 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-09 06:52:38 -07:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-04-08 00:39:54 -07:00
|
|
|
sha256 = "062kh4zj7jfbwy4zzcwpq2m457bzbpm3l18s0ysnw3mgia3siz8f";
|
2013-04-02 16:08:48 -07:00
|
|
|
};
|
|
|
|
|
2018-03-14 20:05:11 -07:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit kmod openvpn;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-08-09 06:52:38 -07:00
|
|
|
buildInputs = [ openvpn networkmanager ]
|
2020-03-15 17:17:13 -07:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret libnma ];
|
2013-04-02 16:08:48 -07:00
|
|
|
|
2018-10-04 15:40:30 -07:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig file libxml2 ];
|
2013-04-02 16:08:48 -07:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-09 06:52:38 -07:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2015-04-08 08:45:41 -07:00
|
|
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
2018-09-23 03:53:46 -07:00
|
|
|
"--enable-absolute-paths"
|
2013-04-02 16:08:48 -07:00
|
|
|
];
|
|
|
|
|
2018-03-06 21:10:37 -08:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-openvpn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-09 06:52:38 -07:00
|
|
|
meta = with stdenv.lib; {
|
2013-07-10 23:49:31 -07:00
|
|
|
description = "NetworkManager's OpenVPN plugin";
|
2013-04-02 16:08:48 -07:00
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 06:52:38 -07:00
|
|
|
license = licenses.gpl2Plus;
|
2013-04-02 16:08:48 -07:00
|
|
|
};
|
|
|
|
}
|