diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
commit | aa4353b499e6950b7333578f936455a628145c31 (patch) | |
tree | c6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/pkgs/tools/text/xml/xml2/default.nix | |
parent | ac456d475f4e50818499b804359355c0f3b4bbf7 (diff) | |
parent | 52185f4d76c18d8348f963795dfed1de018e8dfe (diff) | |
download | nixlib-aa4353b499e6950b7333578f936455a628145c31.tar nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2 nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst nixlib-aa4353b499e6950b7333578f936455a628145c31.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/tools/text/xml/xml2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/text/xml/xml2/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/xml/xml2/default.nix b/nixpkgs/pkgs/tools/text/xml/xml2/default.nix index 265ab10e5ac8..d469078c91dc 100644 --- a/nixpkgs/pkgs/tools/text/xml/xml2/default.nix +++ b/nixpkgs/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"; |