git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitbf434ca1a1601ac790c5bde57a7d3af5ebd48d2a authorRick van Schijndel <rol3517@gmail.com> dateSun 2 May 2021, 22:04 (6 years ago) parentb6475a8
1 file changed+28−5
pkgs/development/libraries/libnixxml/default.nix+28−5
pkgs/development/libraries/libnixxml/default.nix+28−5
@@ -11,17 +11,40 @@ stdenv.mkDerivation {
1111 sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ=";
1212 };
1313
14− preConfigure = ''
15− ./bootstrap
14+ postPatch = ''
15+ # Remove broken test
16+ substituteInPlace tests/draw/Makefile.am \
17+ --replace "draw-wrong.sh" ""
18+ rm tests/draw/draw-wrong.sh
19+ '';
20+
21+ preAutoreconf = ''
22+ # Copied from bootstrap script
23+ ln -s README.md README
24+ mkdir -p config
1625 '';
1726
1827 configureFlags = [ "--with-gd" "--with-glib" ];
1928 CFLAGS = "-Wall";
2029
21− nativeBuildInputs = [ autoreconfHook pkg-config ];
22− buildInputs = [ libxml2 gd.dev glib getopt libxslt nix ];
30+ strictDeps = true;
31+ nativeBuildInputs = [
32+ autoreconfHook
33+ pkg-config
34+ getopt
35+ libxslt
36+ ];
37+ buildInputs = [
38+ libxml2
39+ gd.dev
40+ glib
41+ nix
42+ ];
43+ checkInputs = [
44+ nix
45+ ];
2346
24− doCheck = false;
47+ doCheck = true;
2548
2649 meta = with lib; {
2750 description = "XML-based Nix-friendly data integration library";