nixpkgs/pkgs/tools/networking/network-manager/vpnc.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

2015-04-08 16:45:41 +01:00
{ stdenv, fetchurl, vpnc, intltool, pkgconfig, networkmanager, libsecret
, withGnome ? true, gnome3, procps, kmod }:
stdenv.mkDerivation rec {
2016-06-22 02:11:50 +01:00
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-vpnc";
2016-10-06 15:36:38 +01:00
major = "1.2";
version = "${major}.4";
src = fetchurl {
2016-10-06 15:36:38 +01:00
url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
sha256 = "39c7516418e90208cb534c19628ce40fd50eba0a08b2ebaef8da85720b10fb05";
};
2015-04-08 16:45:41 +01:00
buildInputs = [ vpnc networkmanager libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring
gnome3.networkmanagerapplet ];
nativeBuildInputs = [ intltool pkgconfig ];
configureFlags = [
"${if withGnome then "--with-gnome --with-gtkver=3" else "--without-gnome"}"
"--disable-static"
];
preConfigure = ''
substituteInPlace "configure" \
--replace "/sbin/sysctl" "${procps}/bin/sysctl"
substituteInPlace "src/nm-vpnc-service.c" \
--replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \
--replace "/sbin/modprobe" "${kmod}/bin/modprobe"
'';
meta = {
description = "NetworkManager's VPNC plugin";
inherit (networkmanager.meta) maintainers platforms;
};
}