1{
2 lib,
3 stdenv,
4 fetchurl,
5 perl,
6}:
7stdenv.mkDerivation rec {
8 pname = "xmlformat";
9 version = "1.04";
10
11 src = fetchurl {
12 url = "http://www.kitebird.com/software/xmlformat/xmlformat-${version}.tar.gz";
13 sha256 = "1vwgzn4ha0az7dx0cyc6dx5nywwrx9gxhyh08mvdcq27wjbh79vi";
14 };
15
16 buildInputs = [ perl ];
17 buildPhase = ''
18 patchShebangs ./xmlformat.pl
19 '';
20
21 installPhase = ''
22 mkdir -p $out/bin
23 cp ./xmlformat.pl $out/bin/xmlformat
24 cp ./LICENSE $out/
25 '';
26
27 meta = {
28 description = "Configurable formatter (or 'pretty-printer') for XML documents";
29 mainProgram = "xmlformat";
30 homepage = "http://www.kitebird.com/software/xmlformat/";
31 license = lib.licenses.bsd3;
32 platforms = lib.platforms.all;
33 };
34}