3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/network-manager/openconnect.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2015-04-08 16:45:41 +01:00
{ stdenv, fetchurl, openconnect, intltool, pkgconfig, networkmanager, libsecret
2018-03-27 00:42:46 +01:00
, withGnome ? true, gnome3, sysctl, kmod }:
let
pname = "NetworkManager-openconnect";
version = "1.2.4";
in stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "15j98wwspv6mcmy91w30as5qc1bzsnhlk060xhjy4qrvd37y0xx1";
};
2015-04-08 16:45:41 +01:00
buildInputs = [ openconnect networkmanager libsecret ]
2018-07-09 23:34:32 +01:00
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring ];
nativeBuildInputs = [ intltool pkgconfig ];
configureFlags = [
"${if withGnome then "--with-gnome --with-gtkver=3" else "--without-gnome"}"
"--disable-static"
];
preConfigure = ''
substituteInPlace "configure" \
2018-03-27 00:42:46 +01:00
--replace "/sbin/sysctl" "${sysctl}/bin/sysctl"
substituteInPlace "src/nm-openconnect-service.c" \
--replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \
--replace "/sbin/modprobe" "${kmod}/bin/modprobe"
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "networkmanager-openconnect";
};
};
meta = {
description = "NetworkManager's OpenConnect plugin";
inherit (networkmanager.meta) maintainers platforms;
};
}