3
0
Fork 0
forked from mirrors/nixpkgs

Adding pdflrf (to get nice LRF files for Sony PRS)

svn path=/nixpkgs/trunk/; revision=14646
This commit is contained in:
Lluís Batlle i Rossell 2009-03-22 13:25:12 +00:00
parent d52b60af22
commit eb87994383
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,40 @@
{stdenv, fetchurl, expat, freetype, fontconfig, libstdcpp5}:
stdenv.mkDerivation ( rec {
name = "pdflrf-0.99";
src = fetchurl {
# I got it from http://www.mobileread.com/forums/showthread.php?t=13135
# But that needs user registration to allow downloading.
# I unpacked the executable (upx) to allow patchelf to manage it
# Temporary place:
url = http://vicerveza.homeunix.net/~viric/soft/pdflrf-linux-0.99.bz2;
sha256 = "faf8c68b586d367e227581294a4dc22b2865291446d40b72d70b4dd53f7088d4";
};
buildInputs = [ expat freetype fontconfig libstdcpp5 ];
phases = "unpackPhase patchPhase installPhase";
unpackPhase = "bunzip2 -c $src > pdflrf ; chmod +x pdflrf";
patchPhase = ''
set -x
fullPath=
for i in $buildInputs; do
fullPath=$fullPath:$i/lib
done
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $fullPath pdflrf
'';
installPhase = "ensureDir $out/bin; cp pdflrf $out/bin";
meta = {
description = "PDF to LRF converter (Sony Portable Reader System format)";
homepage = http://www.mobileread.com/forums/showthread.php?t=13135;
# The program comes as binary-only, but free to use.
license = "free";
};
})

View file

@ -1076,6 +1076,11 @@ let
inherit fetchurl stdenv;
};
pdflrf = import ../tools/graphics/pdflrf {
inherit fetchurl stdenv expat freetype fontconfig;
libstdcpp5 = gcc33.gcc;
};
pdsh = import ../tools/networking/pdsh {
inherit fetchurl stdenv perl;
readline = if getPkgConfig "pdsh" "readline" true then readline else null;