nixpkgs-suyu/pkgs/tools/networking/networkmanager/vpnc/default.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

2021-01-17 04:51:22 +01:00
{ lib, stdenv, fetchurl, substituteAll, vpnc, intltool, pkg-config, networkmanager, libsecret
, 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";
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}";
src = fetchurl {
2021-01-15 10:19:50 +01:00
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1js5lwcsqws4klgypfxl4ikmakv7v7xgddij1fj6b0y0qicx0kyy";
};
2018-08-09 16:25:30 +02:00
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit vpnc kmod;
})
# 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
];
buildInputs = [ vpnc networkmanager glib ]
2021-01-15 10:19:50 +01:00
++ lib.optionals withGnome [ gtk3 libsecret libnma ];
2021-01-17 04:51:22 +01:00
nativeBuildInputs = [ intltool pkg-config file ];
configureFlags = [
"--without-libnm-glib"
2018-08-09 16:25:30 +02:00
"--with-gnome=${if withGnome then "yes" else "no"}"
"--enable-absolute-paths"
];
2018-03-07 06:10:57 +01:00
passthru = {
updateScript = gnome.updateScript {
2018-03-07 06:10:57 +01:00
packageName = pname;
attrPath = "networkmanager-vpnc";
versionPolicy = "odd-unstable";
2018-03-07 06:10:57 +01:00
};
};
meta = with lib; {
description = "NetworkManager's VPNC plugin";
inherit (networkmanager.meta) maintainers platforms;
2018-08-09 16:25:30 +02:00
license = licenses.gpl2Plus;
};
}