3
0
Fork 0
forked from mirrors/nixpkgs

qutebrowser: add pdfjs support

This commit is contained in:
Nikolay Amiantov 2016-08-23 19:18:22 +03:00
parent 07c44b81c3
commit 76223aa4b2

View file

@ -1,13 +1,30 @@
{ stdenv, fetchurl, buildPythonApplication, makeQtWrapper, wrapGAppsHook { stdenv, fetchurl, unzip, buildPythonApplication, makeQtWrapper, wrapGAppsHook
, qtbase, pyqt5, jinja2, pygments, pyyaml, pypeg2, glib_networking , qtbase, pyqt5, jinja2, pygments, pyyaml, pypeg2, glib_networking
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2, libxslt , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2, libxslt
, gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav , gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav
, qtwebkit-plugins }: , qtwebkit-plugins }:
let version = "0.8.2"; in let
pdfjs = stdenv.mkDerivation rec {
name = "pdfjs-${version}";
version = "1.4.20";
buildPythonApplication rec { src = fetchurl {
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/${name}-dist.zip";
sha256 = "1ca1fzyc5qnan6gavcd8bnfqriqqvgdsf4m8ka4nayf50k64xxj9";
};
nativeBuildInputs = [ unzip ];
buildCommand = ''
mkdir $out
unzip -d $out $src
'';
};
in buildPythonApplication rec {
name = "qutebrowser-${version}"; name = "qutebrowser-${version}";
version = "0.8.2";
namePrefix = ""; namePrefix = "";
src = fetchurl { src = fetchurl {
@ -34,6 +51,7 @@ buildPythonApplication rec {
postPatch = '' postPatch = ''
sed -i "s,/usr/share/qutebrowser,$out/share/qutebrowser,g" qutebrowser/utils/standarddir.py sed -i "s,/usr/share/qutebrowser,$out/share/qutebrowser,g" qutebrowser/utils/standarddir.py
sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
''; '';
postBuild = '' postBuild = ''