nixpkgs/pkgs/tools/networking/network-manager/openconnect/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, substituteAll, openconnect, intltool, pkgconfig, autoreconfHook, networkmanager, gcr, libsecret, file
2019-02-13 21:47:50 +00:00
, gtk3, withGnome ? true, gnome3, kmod }:
let
pname = "NetworkManager-openconnect";
version = "1.2.6";
2019-08-13 21:52:01 +00:00
in stdenv.mkDerivation {
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 = "0nlp290nkawc4wqm978n4vhzg3xdqi8kpjjx19l855vab41rh44m";
};
2018-08-09 15:09:11 +00:00
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit kmod openconnect;
})
];
buildInputs = [ openconnect networkmanager ]
++ stdenv.lib.optionals withGnome [ gtk3 gcr libsecret ];
nativeBuildInputs = [ intltool pkgconfig file ];
configureFlags = [
2018-08-09 15:09:11 +00:00
"--with-gnome=${if withGnome then "yes" else "no"}"
"--enable-absolute-paths"
"--without-libnm-glib"
];
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "networkmanager-openconnect";
};
};
2018-08-09 15:09:11 +00:00
meta = with stdenv.lib; {
description = "NetworkManager's OpenConnect plugin";
inherit (networkmanager.meta) maintainers platforms;
2018-08-09 15:09:11 +00:00
license = licenses.gpl2Plus;
};
}