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
1 changed files with 28 additions and 5 deletions

View File

@ -11,17 +11,40 @@ stdenv.mkDerivation {
sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ="; sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ=";
}; };
preConfigure = '' postPatch = ''
./bootstrap # 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" ]; configureFlags = [ "--with-gd" "--with-glib" ];
CFLAGS = "-Wall"; CFLAGS = "-Wall";
nativeBuildInputs = [ autoreconfHook pkg-config ]; strictDeps = true;
buildInputs = [ libxml2 gd.dev glib getopt libxslt nix ]; nativeBuildInputs = [
autoreconfHook
pkg-config
getopt
libxslt
];
buildInputs = [
libxml2
gd.dev
glib
nix
];
checkInputs = [
nix
];
doCheck = false; doCheck = true;
meta = with lib; { meta = with lib; {
description = "XML-based Nix-friendly data integration library"; description = "XML-based Nix-friendly data integration library";