2018-08-09 15:25:30 +01:00
|
|
|
{ stdenv, fetchurl, substituteAll, vpnc, intltool, pkgconfig, networkmanager, libsecret
|
2019-02-13 21:47:50 +00:00
|
|
|
, gtk3, withGnome ? true, gnome3, kmod, file }:
|
2018-03-07 05:10:57 +00:00
|
|
|
let
|
2018-08-09 15:25:30 +01:00
|
|
|
pname = "NetworkManager-vpnc";
|
2018-07-23 21:43:07 +01:00
|
|
|
version = "1.2.6";
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-09 15:25:30 +01:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2013-07-10 15:18:18 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-09 15:25:30 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2018-07-23 21:43:07 +01:00
|
|
|
sha256 = "1js5lwcsqws4klgypfxl4ikmakv7v7xgddij1fj6b0y0qicx0kyy";
|
2013-07-10 15:18:18 +01:00
|
|
|
};
|
|
|
|
|
2018-08-09 15:25:30 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit vpnc kmod;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ vpnc networkmanager ]
|
2019-02-13 21:47:50 +00:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret gnome3.networkmanagerapplet ];
|
2013-07-10 15:18:18 +01:00
|
|
|
|
2018-07-23 21:43:07 +01:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig file ];
|
2013-07-10 15:18:18 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-28 14:04:24 +01:00
|
|
|
"--without-libnm-glib"
|
2018-08-09 15:25:30 +01:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2018-09-23 11:53:46 +01:00
|
|
|
"--enable-absolute-paths"
|
2013-07-10 15:18:18 +01:00
|
|
|
];
|
|
|
|
|
2018-03-07 05:10:57 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-vpnc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-09 15:25:30 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-07-11 07:49:31 +01:00
|
|
|
description = "NetworkManager's VPNC plugin";
|
2013-07-10 15:18:18 +01:00
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 15:25:30 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2013-07-10 15:18:18 +01:00
|
|
|
};
|
|
|
|
}
|