summary refs log tree commit diff
path: root/pkgs/tools/typesetting/halibut/default.nix
blob: 28325825ca2c5478b0270ae8665daa9028c95713 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{stdenv, fetchurl, perl}:

stdenv.mkDerivation rec {
  name = "halibut-1.1";

  src = fetchurl {
    url = "http://www.chiark.greenend.org.uk/~sgtatham/halibut/${name}.tar.gz";
    sha256 = "18409ir55rsa5gkizw2hsr86wgv176jms2dc52px62gd246rar5r";
  };

  buildInputs = [ perl ];

  patchPhase = ''
    sed -i -e s@/usr/local@$out@ Makefile
    sed -i -e 's@(prefix)/man@(prefix)/share/man@' doc/Makefile
  '';

  installPhase = ''
    mkdir -p $out/bin
    mkdir -p $out/share/man/man1
    pushd doc
    make halibut.1
    popd
    make install
  '';

  meta = with stdenv.lib; {
    description = "Documentation production system for software manuals";
    homepage = http://www.chiark.greenend.org.uk/~sgtatham/halibut/;
    license = licenses.mit;
    maintainers = with maintainers; [ pSub ];
  };
}