lol
1{lib, stdenv, fetchzip, libtommath}:
2
3stdenv.mkDerivation rec {
4 pname = "convertlit";
5 version = "1.8";
6
7 src = fetchzip {
8 url = "http://www.convertlit.com/convertlit${lib.replaceStrings ["."] [""] version}src.zip";
9 sha256 = "182nsin7qscgbw2h92m0zadh3h8q410h5cza6v486yjfvla3dxjx";
10 stripRoot = false;
11 };
12
13 buildInputs = [libtommath];
14
15 hardeningDisable = [ "format" ];
16
17 buildPhase = ''
18 cd lib
19 make
20 cd ../clit18
21 substituteInPlace Makefile \
22 --replace ../libtommath-0.30/libtommath.a -ltommath
23 make
24 '';
25
26 installPhase = ''
27 mkdir -p $out/bin
28 cp clit $out/bin
29 '';
30
31 meta = {
32 homepage = "http://www.convertlit.com/";
33 description = "A tool for converting Microsoft Reader ebooks to more open formats";
34 license = lib.licenses.gpl2;
35 platforms = lib.platforms.linux;
36 };
37}