nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 83 lines 1.6 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 replaceVars, 6 glib, 7 libxml2, 8 openconnect, 9 intltool, 10 pkg-config, 11 networkmanager, 12 gcr, 13 libsecret, 14 file, 15 gtk3, 16 webkitgtk_4_1, 17 libnma, 18 libnma-gtk4, 19 gtk4, 20 withGnome ? true, 21 gnome, 22 kmod, 23}: 24 25stdenv.mkDerivation rec { 26 pname = "NetworkManager-openconnect"; 27 version = "1.2.10"; 28 29 src = fetchurl { 30 url = "mirror://gnome/sources/NetworkManager-openconnect/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 31 sha256 = "hEtr9k7K25e0pox3bbiapebuflm9JLAYAihAaGMTZGQ="; 32 }; 33 34 patches = [ 35 (replaceVars ./fix-paths.patch { 36 inherit kmod openconnect; 37 }) 38 ]; 39 40 buildInputs = [ 41 libxml2 42 openconnect 43 networkmanager 44 webkitgtk_4_1 # required, for SSO 45 ] 46 ++ lib.optionals withGnome [ 47 gtk3 48 libnma 49 libnma-gtk4 50 gtk4 51 gcr 52 libsecret 53 ]; 54 55 nativeBuildInputs = [ 56 glib 57 intltool 58 pkg-config 59 file 60 ]; 61 62 configureFlags = [ 63 "--with-gnome=${if withGnome then "yes" else "no"}" 64 "--with-gtk4=${if withGnome then "yes" else "no"}" 65 "--enable-absolute-paths" 66 ]; 67 68 passthru = { 69 updateScript = gnome.updateScript { 70 packageName = pname; 71 attrPath = "networkmanager-openconnect"; 72 versionPolicy = "odd-unstable"; 73 }; 74 networkManagerPlugin = "VPN/nm-openconnect-service.name"; 75 networkManagerRuntimeDeps = [ openconnect ]; 76 }; 77 78 meta = with lib; { 79 description = "NetworkManagers OpenConnect plugin"; 80 inherit (networkmanager.meta) maintainers teams platforms; 81 license = licenses.gpl2Plus; 82 }; 83}