mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 18:23:09 +00:00
2eacddf0dc
* pgadmin: use https homepage * msn-pecan: move homepage to github google code is now unavailable * pidgin-latex: use https for homepage * pidgin-opensteamworks: use github for homepage google code is unavailable * putty: use https for homepage * ponylang: use https for homepage * picolisp: use https for homepage * phonon: use https for homepage * pugixml: use https for homepage * pioneer: use https for homepage * packer: use https for homepage * pokerth: usee https for homepage * procps-ng: use https for homepage * pycaml: use https for homepage * proot: move homepage to .github.io * pius: use https for homepage * pdfread: use https for homepage * postgresql: use https for homepage * ponysay: move homepage to new site * prometheus: use https for homepage * powerdns: use https for homepage * pm-utils: use https for homepage * patchelf: move homepage to https * tesseract: move homepage to github * quodlibet: move homepage from google code * jbrout: move homepage from google code * eiskaltdcpp: move homepage to github * nodejs: use https to homepage * nix: use https for homepage * pdf2djvu: move homepage from google code * game-music-emu: move homepage from google code * vacuum: move homepae from google code
51 lines
1.5 KiB
Nix
51 lines
1.5 KiB
Nix
{stdenv, fetchurl, unzip, python, makeWrapper, ghostscript, pngnq, pillow, djvulibre
|
|
, optipng, unrar}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "pdfread-1.8.2";
|
|
|
|
src = fetchurl {
|
|
# I got it from http://www.mobileread.com/forums/showthread.php?t=21906
|
|
# But that needs user registration to allow downloading.
|
|
# This is an evolution from pdfread 1.7 in http://pdfread.sourceforge.net/
|
|
# Temporary place:
|
|
url = http://vicerveza.homeunix.net/~viric/soft/PDFRead-1.8.2-Source-noGUI-noInstaller.zip;
|
|
sha256 = "0mzxpnk97f0ww5ds7h4wsval3g4lnrhv6rhspjs7cy4i41gmk8an";
|
|
};
|
|
|
|
buildInputs = [ unzip python makeWrapper ];
|
|
|
|
broken = true; # Not found.
|
|
|
|
phases = "unpackPhase patchPhase installPhase";
|
|
|
|
unpackPhase = ''
|
|
unzip $src
|
|
sourceRoot=`pwd`/PDFRead/src
|
|
'';
|
|
|
|
patchPhase = ''
|
|
sed -i 's,#!/usr.*,#!${python}/bin/python,' pdfread.py
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp pdfread.py $out/bin
|
|
chmod +x $out/bin/pdfread.py
|
|
|
|
LIBSUFFIX=lib/${python.libPrefix}/site-packages/
|
|
PYDIR=$out/$LIBSUFFIX
|
|
mkdir -p $PYDIR
|
|
cp -R *.py pylrs $PYDIR
|
|
|
|
wrapProgram $out/bin/pdfread.py --prefix PYTHONPATH : $PYTHONPATH:${pillow}/$LIBSUFFIX/PIL:$PYDIR \
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ ghostscript pngnq djvulibre unrar optipng ]}
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "PDF/DJVU to ebook format converter";
|
|
homepage = https://www.mobileread.com/forums/showthread.php?t=21906;
|
|
license = licenses.mit;
|
|
};
|
|
}
|