xml2: add install check
This commit is contained in:
parent
adbbbf0d1f
commit
1db5ef6869
|
@ -12,6 +12,25 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libxml2 ];
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
echo -n 'checking csv2 and 2csv...'
|
||||
$out/bin/csv2 -f <<< $'a,b\n1,2' \
|
||||
| $out/bin/2csv record a b \
|
||||
| grep -qF '1,2'
|
||||
echo ' ok'
|
||||
|
||||
echo -n 'checking xml2 and 2xml...'
|
||||
$out/bin/xml2 <<< $'<a>abc</a>' \
|
||||
| $out/bin/2xml \
|
||||
| grep -qF '<a>abc</a>'
|
||||
echo ' ok'
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://web.archive.org/web/20160515005047/http://dan.egnor.name:80/xml2";
|
||||
description = "Tools for command line processing of XML, HTML, and CSV";
|
||||
|
|
Loading…
Reference in a new issue