1 { lib, stdenv, fetchurl, pkg-config, libxml2 }:
3 stdenv.mkDerivation rec {
8 url = "https://web.archive.org/web/20160427221603/http://download.ofb.net/gale/xml2-${version}.tar.gz";
9 sha256 = "01cps980m99y99cnmvydihga9zh3pvdsqag2fi1n6k2x7rfkl873";
12 nativeBuildInputs = [ pkg-config ];
13 buildInputs = [ libxml2 ];
15 doInstallCheck = true;
16 installCheckPhase = ''
17 runHook preInstallCheck
19 echo -n 'checking csv2 and 2csv...'
20 $out/bin/csv2 -f <<< $'a,b\n1,2' \
21 | $out/bin/2csv record a b \
25 echo -n 'checking xml2 and 2xml...'
26 $out/bin/xml2 <<< $'<a>abc</a>' \
28 | grep -qF '<a>abc</a>'
31 runHook postInstallCheck
35 homepage = "https://web.archive.org/web/20160515005047/http://dan.egnor.name:80/xml2";
36 description = "Tools for command line processing of XML, HTML, and CSV";
37 license = licenses.gpl2Plus;
38 platforms = platforms.all;
39 maintainers = [ maintainers.rycee ];