summary refs log tree commit diff
path: root/pkgs/tools/typesetting/halibut/default.nix
blob: f0ed44351a20813ff220483a2ef11cb7140a8417 (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
34
{stdenv, fetchurl, perl}:

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

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

  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 = https://www.chiark.greenend.org.uk/~sgtatham/halibut/;
    license = licenses.mit;
    maintainers = with maintainers; [ pSub ];
    platforms = with platforms; unix;
  };
}