mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
38313d5d87
Fixed all references, hopefully. libxml2Python is slightly hacky now, but it seems to work.
34 lines
852 B
Nix
34 lines
852 B
Nix
{ stdenv, fetchurl, pkgconfig, vpnc, openssl ? null, gnutls ? null, libxml2, zlib } :
|
|
|
|
let
|
|
xor = a: b: (a || b) && (!(a && b));
|
|
in
|
|
|
|
assert xor (openssl != null) (gnutls != null);
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "openconnect-7.06";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"ftp://ftp.infradead.org/pub/openconnect/${name}.tar.gz"
|
|
];
|
|
sha256 = "1wkhmgfxkdkhy2p9w9idrgipxmxij2z4f88flfk3fifwd19nkkzs";
|
|
};
|
|
|
|
preConfigure = ''
|
|
export PKG_CONFIG=${pkgconfig}/bin/pkg-config
|
|
export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2"
|
|
export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2"
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--with-vpnc-script=${vpnc}/etc/vpnc/vpnc-script"
|
|
"--disable-nls"
|
|
"--without-openssl-version-check"
|
|
];
|
|
|
|
buildInputs = [ pkgconfig ];
|
|
propagatedBuildInputs = [ vpnc openssl gnutls libxml2 zlib ];
|
|
}
|