Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.3 kB view raw
1{ 2 version, 3 src, 4}: 5 6{ 7 lib, 8 stdenv, 9 pkg-config, 10 gnutls, 11 p11-kit, 12 openssl, 13 useOpenSSL ? false, 14 gmp, 15 libxml2, 16 stoken, 17 zlib, 18 pcsclite, 19 vpnc-scripts, 20 useDefaultExternalBrowser ? 21 stdenv.hostPlatform.isLinux && stdenv.buildPlatform == stdenv.hostPlatform, # xdg-utils doesn't cross-compile 22 xdg-utils, 23 autoreconfHook, 24}: 25 26stdenv.mkDerivation { 27 pname = "openconnect"; 28 inherit version src; 29 30 outputs = [ 31 "out" 32 "dev" 33 ]; 34 35 configureFlags = [ 36 "--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script" 37 "--disable-nls" 38 "--without-openssl-version-check" 39 ]; 40 41 buildInputs = [ 42 gmp 43 libxml2 44 stoken 45 zlib 46 (if useOpenSSL then openssl else gnutls) 47 ] 48 ++ lib.optionals stdenv.hostPlatform.isLinux [ 49 p11-kit 50 pcsclite 51 ] 52 ++ lib.optional useDefaultExternalBrowser xdg-utils; 53 nativeBuildInputs = [ 54 pkg-config 55 autoreconfHook 56 ]; 57 58 meta = with lib; { 59 description = "VPN Client for Cisco's AnyConnect SSL VPN"; 60 homepage = "https://www.infradead.org/openconnect/"; 61 license = licenses.lgpl21Only; 62 maintainers = with maintainers; [ 63 pradeepchhetri 64 tricktron 65 pentane 66 ]; 67 platforms = lib.platforms.unix; 68 mainProgram = "openconnect"; 69 }; 70}