about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix b/nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix
new file mode 100644
index 000000000000..8dfec26e8116
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/xml/xmlformat/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, perl }:
+stdenv.mkDerivation rec {
+  pname = "xmlformat";
+  version = "1.04";
+
+  src = fetchurl {
+    url = "http://www.kitebird.com/software/xmlformat/xmlformat-${version}.tar.gz";
+    sha256 = "1vwgzn4ha0az7dx0cyc6dx5nywwrx9gxhyh08mvdcq27wjbh79vi";
+  };
+
+  buildInputs = [ perl ];
+  buildPhase = ''
+    patchShebangs ./xmlformat.pl
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ./xmlformat.pl $out/bin/xmlformat
+    cp ./LICENSE $out/
+  '';
+
+  meta = {
+    description = "a configurable formatter (or 'pretty-printer') for XML documents";
+    homepage = "http://www.kitebird.com/software/xmlformat/";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}