12 # Note: this package is used for bootstrapping fetchurl, and thus
13 # cannot use fetchpatch! All mutable patches (generated by GitHub or
14 # cgit) that are needed here should be included directly in Nixpkgs as
17 stdenv.mkDerivation rec {
22 url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz";
23 sha256 = "1gnwihpfz4x18rwd6cbrdggmfqjzwsdfh1gpmc0ph21c4gq2097g";
28 outputs = [ "out" "dev" ]; # TODO: fix referrers
31 enableParallelBuilding = true;
33 configureFlags = lib.optional stdenv.isFreeBSD "--with-pic";
35 outputMan = "dev"; # tiny page for a dev tool
37 doCheck = true; # not cross;
40 patchShebangs ./configure ./run.sh ./test-driver-wrapper.sh
43 # CMake files incorrectly calculate library path from dev prefix
44 # https://github.com/libexpat/libexpat/issues/501
46 substituteInPlace $dev/lib/cmake/expat-${version}/expat-noconfig.cmake \
47 --replace "$"'{_IMPORT_PREFIX}' $out
52 inherit (python3.pkgs) xmltodict;
53 inherit (haskellPackages) hexpat;
54 inherit (perlPackages) XMLSAXExpat XMLParser;
55 inherit (luaPackages) luaexpat;
56 inherit (ocamlPackages) ocaml_expat;
60 homepage = "https://libexpat.github.io/";
61 description = "A stream-oriented XML parser library written in C";
62 platforms = platforms.all;
63 license = licenses.mit; # expat version