2021-01-17 04:51:22 +01:00
|
|
|
{ lib, stdenv, fetchurl, substituteAll, vpnc, intltool, pkg-config, networkmanager, libsecret
|
2021-05-07 23:18:14 +02:00
|
|
|
, gtk3, withGnome ? true, gnome, glib, kmod, file, fetchpatch, libnma }:
|
2018-03-07 06:10:57 +01:00
|
|
|
let
|
2018-08-09 16:25:30 +02:00
|
|
|
pname = "NetworkManager-vpnc";
|
2018-07-23 22:43:07 +02:00
|
|
|
version = "1.2.6";
|
2019-08-13 23:52:01 +02:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-09 16:25:30 +02:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2013-07-10 16:18:18 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-15 10:19:50 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2018-07-23 22:43:07 +02:00
|
|
|
sha256 = "1js5lwcsqws4klgypfxl4ikmakv7v7xgddij1fj6b0y0qicx0kyy";
|
2013-07-10 16:18:18 +02:00
|
|
|
};
|
|
|
|
|
2018-08-09 16:25:30 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit vpnc kmod;
|
|
|
|
})
|
2019-09-16 05:41:07 +02:00
|
|
|
# Don't use etc/dbus-1/system.d
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/NetworkManager-vpnc/merge_requests/5.patch";
|
|
|
|
sha256 = "0z0x5vqmrsap3ynamhya7gh6c6k5grhj2vqpy76alnv9xns8dzi6";
|
|
|
|
})
|
2018-08-09 16:25:30 +02:00
|
|
|
];
|
|
|
|
|
2020-04-15 07:58:42 +02:00
|
|
|
buildInputs = [ vpnc networkmanager glib ]
|
2021-01-15 10:19:50 +01:00
|
|
|
++ lib.optionals withGnome [ gtk3 libsecret libnma ];
|
2013-07-10 16:18:18 +02:00
|
|
|
|
2021-01-17 04:51:22 +01:00
|
|
|
nativeBuildInputs = [ intltool pkg-config file ];
|
2013-07-10 16:18:18 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-28 15:04:24 +02:00
|
|
|
"--without-libnm-glib"
|
2018-08-09 16:25:30 +02:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2018-09-23 12:53:46 +02:00
|
|
|
"--enable-absolute-paths"
|
2013-07-10 16:18:18 +02:00
|
|
|
];
|
|
|
|
|
2018-03-07 06:10:57 +01:00
|
|
|
passthru = {
|
2021-05-07 23:18:14 +02:00
|
|
|
updateScript = gnome.updateScript {
|
2018-03-07 06:10:57 +01:00
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-vpnc";
|
2021-03-21 00:57:24 +01:00
|
|
|
versionPolicy = "odd-unstable";
|
2018-03-07 06:10:57 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2013-07-11 08:49:31 +02:00
|
|
|
description = "NetworkManager's VPNC plugin";
|
2013-07-10 16:18:18 +02:00
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 16:25:30 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2013-07-10 16:18:18 +02:00
|
|
|
};
|
|
|
|
}
|