summary refs log tree commit diff
path: root/pkgs/tools/text/txt2tags/default.nix
blob: 6aad3c7b23dac2f9e27e66d5b94bb5b95bc138b7 (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
35
{ stdenv, fetchurl, python }:

stdenv.mkDerivation rec {
  version = "2.6";
  name = "txt2tags-${version}";

  dontBuild = true;

  # Python script, needs the interpreter
  propagatedBuildInputs = [ python ];

  installPhase = ''
    mkdir -p "$out/bin"
    mkdir -p "$out/share/doc"
    mkdir -p "$out/share/man/man1/"
    sed '1s|/usr/bin/env python|${python}/bin/python|' < txt2tags > "$out/bin/txt2tags"
    chmod +x "$out/bin/txt2tags"
    gzip - < doc/manpage.man > "$out/share/man/man1/txt2tags.1.gz"
    cp doc/userguide.pdf "$out/share/doc"
    cp -r extras/ samples/ test/ "$out/share"
  '';

  src = fetchurl {
    url = "http://txt2tags.googlecode.com/files/${name}.tgz";
    sha256 = "0p5hql559pk8v5dlzgm75yrcxwvz4z30f1q590yzng0ghvbnf530";
  };

  meta = {
    homepage = http://txt2tags.org/;
    description = "A KISS markup language";
    license  = stdenv.lib.licenses.gpl2;
    maintainers = with stdenv.lib.maintainers; [ kovirobi ];
    platforms = with stdenv.lib.platforms; unix;
  };
}