depot/third_party/nixpkgs/pkgs/tools/text/xml/xmlstarlet/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

33 lines
873 B
Nix

{ stdenv, fetchurl, pkgconfig, libxml2, libxslt }:
stdenv.mkDerivation rec {
name = "xmlstarlet-1.6.1";
src = fetchurl {
url = "mirror://sourceforge/xmlstar/${name}.tar.gz";
sha256 = "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libxml2 libxslt ];
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
'';
meta = {
description = "A command line tool for manipulating and querying XML data";
homepage = "http://xmlstar.sourceforge.net/";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix;
};
}