diff options
author | Robert Helgesson <robert@rycee.net> | 2023-08-24 22:33:55 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2023-08-25 08:22:36 +0200 |
commit | 1db5ef68695e0b9b85176ea8ce6ca862291c8e6b (patch) | |
tree | 89eb03ea2066bdf7377ae9845952d30a9040c785 /pkgs/tools/text/xml | |
parent | adbbbf0d1f1e99b507b1f991b5e7d55bb87503de (diff) |
xml2: add install check
Diffstat (limited to 'pkgs/tools/text/xml')
-rw-r--r-- | pkgs/tools/text/xml/xml2/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/tools/text/xml/xml2/default.nix b/pkgs/tools/text/xml/xml2/default.nix index 265ab10e5ac8f..d469078c91dc0 100644 --- a/pkgs/tools/text/xml/xml2/default.nix +++ b/pkgs/tools/text/xml/xml2/default.nix @@ -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"; |