libnixxml: fix build + support cross + enable tests

Run the symlinking of the ./bootstrap script in the preAutoreconf hook.

Remove the tests that are broken and enable testing again.

Put correct dependencies in nativeBuildInputs vs buildInputs vs
checkInputs to support cross-compilation.
This commit is contained in:
Rick van Schijndel 2021-05-02 22:04:10 +02:00 committed by tomberek
parent b6475a8f90
commit bf434ca1a1

View file

@ -11,17 +11,40 @@ stdenv.mkDerivation {
sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ=";
};
preConfigure = ''
./bootstrap
postPatch = ''
# Remove broken test
substituteInPlace tests/draw/Makefile.am \
--replace "draw-wrong.sh" ""
rm tests/draw/draw-wrong.sh
'';
preAutoreconf = ''
# Copied from bootstrap script
ln -s README.md README
mkdir -p config
'';
configureFlags = [ "--with-gd" "--with-glib" ];
CFLAGS = "-Wall";
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libxml2 gd.dev glib getopt libxslt nix ];
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
getopt
libxslt
];
buildInputs = [
libxml2
gd.dev
glib
nix
];
checkInputs = [
nix
];
doCheck = false;
doCheck = true;
meta = with lib; {
description = "XML-based Nix-friendly data integration library";