about summary refs log tree commit diff
path: root/pkgs/tools/text/convertlit/default.nix
blob: aaa458b05cb10bde1697d7e2c6fd4fb5c6201d57 (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, unzip, libtommath}:

stdenv.mkDerivation {
  name = "convertlit-1.8";
  
  src = fetchurl {
    url = http://www.convertlit.com/convertlit18src.zip;
    sha256 = "1fjpwncyc2r3ipav7c9m7jxy6i7mphbyqj3gsm046425p7sqa2np";
  };

  buildInputs = [unzip libtommath];

  sourceRoot = ".";

  buildPhase = ''
    cd lib
    make
    cd ../clit18
    substituteInPlace Makefile --replace ../libtommath-0.30/libtommath.a -ltommath
    make
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp clit $out/bin
  '';

  meta = {
    homepage = http://www.convertlit.com/;
    description = "A tool for converting Microsoft Reader ebooks to more open formats";
    license = stdenv.lib.licenses.gpl2;
  };
}