xmlstarlet: add autoreconfHook, fix cross compilation

This commit is contained in:
Nick Cao 2023-11-27 23:26:44 -05:00
parent cc0257d063
commit 0461296c62
No known key found for this signature in database

View File

@ -1,4 +1,11 @@
{ lib, stdenv, fetchurl, pkg-config, libxml2, libxslt }:
{ lib
, stdenv
, fetchurl
, autoreconfHook
, pkg-config
, libxml2
, libxslt
}:
stdenv.mkDerivation rec {
pname = "xmlstarlet";
@ -9,7 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libxml2 libxslt ];
patches = [
@ -17,18 +24,16 @@ stdenv.mkDerivation rec {
./fix-incompatible-function-pointer.patch
];
preConfigure =
''
export LIBXSLT_PREFIX=${libxslt.dev}
export LIBXML_PREFIX=${libxml2.dev}
export LIBXSLT_LIBS=$(pkg-config --libs libxslt libexslt)
export LIBXML_LIBS=$(pkg-config --libs libxml-2.0)
'';
preConfigure = ''
export LIBXSLT_PREFIX=${libxslt.dev}
export LIBXML_PREFIX=${libxml2.dev}
export LIBXSLT_LIBS=$($PKG_CONFIG --libs libxslt libexslt)
export LIBXML_LIBS=$($PKG_CONFIG --libs libxml-2.0)
'';
postInstall =
''
ln -s xml $out/bin/xmlstarlet
'';
postInstall = ''
ln -s xml $out/bin/xmlstarlet
'';
meta = {
description = "A command line tool for manipulating and querying XML data";