nixpkgs/pkgs/development/libraries/xercesc/default.nix
Jan Tojnar 8ef1ecd44a xercesc: Use curl network backend
The default `socket` backend does not support TLS.
As a result, attempting to validate the following GPX file with
`SAX2Count -v=always foo.gpx` would fail with `unsupported protocol in URL`
because the Garmin URLs redirect to HTTPS.

    <gpx version="1.1" creator="foo" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 https://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></gpx>

Let’s switch to curl backend.
2023-07-04 00:28:02 +02:00

34 lines
753 B
Nix

{ stdenv
, lib
, fetchurl
, curl
}:
stdenv.mkDerivation rec {
pname = "xerces-c";
version = "3.2.4";
src = fetchurl {
url = "mirror://apache/xerces/c/3/sources/${pname}-${version}.tar.gz";
sha256 = "sha256-PY7Bx/lOOP7g5Mpa0eHZ2yPL86ELumJva0r6Le2v5as=";
};
buildInputs = [
curl
];
configureFlags = [
# Disable SSE2 extensions on platforms for which they are not enabled by default
"--disable-sse2"
"--enable-netaccessor-curl"
];
enableParallelBuilding = true;
meta = {
homepage = "https://xerces.apache.org/xerces-c/";
description = "Validating XML parser written in a portable subset of C++";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}