qutebrowser: make gstreamer and pdfjs configurable (#33074)
qutebrowser: make gstreamer and pdfjs configurable
This commit is contained in:
parent
ed1bd10359
commit
25b7008520
@ -1,37 +1,36 @@
|
|||||||
{ stdenv, lib, fetchurl, unzip, buildPythonApplication, makeWrapper, wrapGAppsHook
|
{ stdenv, lib, fetchurl, fetchzip, python3Packages
|
||||||
, qtbase, pyqt5, jinja2, pygments, pyyaml, pypeg2, pyopengl, cssutils, glib_networking
|
, makeWrapper, wrapGAppsHook, qtbase, glib_networking
|
||||||
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2, libxslt
|
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2
|
||||||
, gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav
|
, libxslt, gst_all_1 ? null
|
||||||
, qtwebkit-plugins ? null
|
, withPdfReader ? true
|
||||||
, attrs
|
, withMediaPlayback ? true
|
||||||
, withWebEngineDefault ? true
|
, withWebEngineDefault ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (! withWebEngineDefault) -> qtwebkit-plugins != null;
|
assert withMediaPlayback -> gst_all_1 != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
pdfjs = stdenv.mkDerivation rec {
|
pdfjs = stdenv.mkDerivation rec {
|
||||||
name = "pdfjs-${version}";
|
name = "pdfjs-${version}";
|
||||||
version = "1.7.225";
|
version = "1.7.225";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/${name}-dist.zip";
|
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/${name}-dist.zip";
|
||||||
sha256 = "1n8ylmv60r0qbw2vilp640a87l4lgnrsi15z3iihcs6dj1n1yy67";
|
sha256 = "0bsmbz7bbh0zpd70dlhss4fjdw7zq356091wld9s7kxnb2rixqd8";
|
||||||
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip ];
|
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
unzip -d $out $src
|
cp -r $src $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in buildPythonApplication rec {
|
in python3Packages.buildPythonApplication rec {
|
||||||
name = "qutebrowser-${version}${fix_postfix}";
|
name = "qutebrowser-${version}${versionPostfix}";
|
||||||
fix_postfix = "";
|
|
||||||
version = "1.0.4";
|
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
version = "1.0.4";
|
||||||
|
versionPostfix = "";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${name}.tar.gz";
|
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${name}.tar.gz";
|
||||||
@ -43,21 +42,25 @@ in buildPythonApplication rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase
|
qtbase
|
||||||
gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav
|
|
||||||
glib_networking
|
glib_networking
|
||||||
]
|
] ++ lib.optionals withMediaPlayback (with gst_all_1; [
|
||||||
++ lib.optional (! withWebEngineDefault) qtwebkit-plugins;
|
gst-plugins-base gst-plugins-good
|
||||||
|
gst-plugins-bad gst-plugins-ugly gst-libav
|
||||||
|
]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper wrapGAppsHook asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
|
makeWrapper wrapGAppsHook asciidoc
|
||||||
|
docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
pyyaml pyqt5 jinja2 pygments pypeg2 cssutils pyopengl attrs
|
pyyaml pyqt5 jinja2 pygments
|
||||||
|
pypeg2 cssutils pyopengl attrs
|
||||||
];
|
];
|
||||||
|
|
||||||
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
|
||||||
|
'' + lib.optionalString withPdfReader ''
|
||||||
sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
|
sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -16660,10 +16660,7 @@ with pkgs;
|
|||||||
|
|
||||||
quodlibet-xine-full = quodlibet-full.override { xineBackend = true; tag = "-xine-full"; };
|
quodlibet-xine-full = quodlibet-full.override { xineBackend = true; tag = "-xine-full"; };
|
||||||
|
|
||||||
qutebrowser = libsForQt5.callPackage ../applications/networking/browsers/qutebrowser {
|
qutebrowser = libsForQt5.callPackage ../applications/networking/browsers/qutebrowser { };
|
||||||
inherit (python3Packages) buildPythonApplication pyqt5 jinja2 pygments pyyaml pypeg2 cssutils pyopengl attrs;
|
|
||||||
inherit (gst_all_1) gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav;
|
|
||||||
};
|
|
||||||
|
|
||||||
rabbitvcs = callPackage ../applications/version-management/rabbitvcs {};
|
rabbitvcs = callPackage ../applications/version-management/rabbitvcs {};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user