From 7493ae8010f527ce67bb84e6fa39db8a1d3b3452 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Aug 2008 19:57:35 +0000 Subject: [PATCH] * Added convertlit, a tool for converting Microsoft Reader ebooks, plus its dependency libtommath. svn path=/nixpkgs/trunk/; revision=12606 --- .../libraries/libtommath/default.nix | 26 +++++++++++++++ pkgs/tools/text/convertlit/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++++ 3 files changed, 67 insertions(+) create mode 100644 pkgs/development/libraries/libtommath/default.nix create mode 100644 pkgs/tools/text/convertlit/default.nix diff --git a/pkgs/development/libraries/libtommath/default.nix b/pkgs/development/libraries/libtommath/default.nix new file mode 100644 index 000000000000..d76237e141d3 --- /dev/null +++ b/pkgs/development/libraries/libtommath/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, libtool}: + +stdenv.mkDerivation { + name = "libtommath-0.39"; + + src = fetchurl { + url = http://math.libtomcrypt.com/files/ltm-0.39.tar.bz2; + sha256 = "1kjx8rrw62nanzc5qp8fj6r3ybhw8ca60ahkyb70f10aiij49zs2"; + }; + + buildInputs = [libtool]; + + preBuild = '' + makeFlagsArray=(LIBPATH=$out/lib INCPATH=$out/include \ + DATAPATH=$out/share/doc/libtommath/pdf \ + INSTALL_GROUP=$(id -g) \ + INSTALL_USER=$(id -u)) + ''; + + makefile = "makefile.shared"; + + meta = { + homepage = http://math.libtomcrypt.com/; + description = "A library for integer-based number-theoretic applications"; + }; +} diff --git a/pkgs/tools/text/convertlit/default.nix b/pkgs/tools/text/convertlit/default.nix new file mode 100644 index 000000000000..4a758626929d --- /dev/null +++ b/pkgs/tools/text/convertlit/default.nix @@ -0,0 +1,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]; + + setSourceRoot = "sourceRoot=."; + + buildPhase = '' + cd lib + make + cd ../clit18 + substituteInPlace Makefile --replace ../libtommath-0.30/libtommath.a -ltommath + make + ''; + + installPhase = '' + ensureDir $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 = "GPL"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e6806d435f23..731f892c07e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -529,6 +529,10 @@ let pkgs = rec { inherit fetchurl stdenv; }; + convertlit = import ../tools/text/convertlit { + inherit fetchurl stdenv unzip libtommath; + }; + coreutils = useFromStdenv "coreutils" ((if stdenv ? isDietLibC then import ../tools/misc/coreutils-5 @@ -3223,6 +3227,10 @@ let pkgs = rec { inherit fetchurl stdenv zlib libjpeg; }; + libtommath = import ../development/libraries/libtommath { + inherit fetchurl stdenv libtool; + }; + giflib = import ../development/libraries/giflib { inherit fetchurl stdenv; };