qutebrowser: patch all python scripts
This commit is contained in:
parent
d117e3ccd8
commit
cf2603f144
@ -55,6 +55,9 @@ in python3Packages.buildPythonApplication rec {
|
|||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
pyyaml pyqt5 jinja2 pygments
|
pyyaml pyqt5 jinja2 pygments
|
||||||
pypeg2 cssutils pyopengl attrs
|
pypeg2 cssutils pyopengl attrs
|
||||||
|
# scripts and userscripts libs
|
||||||
|
tldextract beautifulsoup4
|
||||||
|
pyreadability pykeepass stem
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -81,15 +84,15 @@ in python3Packages.buildPythonApplication rec {
|
|||||||
"$out/share/icons/hicolor/scalable/apps/qutebrowser.svg"
|
"$out/share/icons/hicolor/scalable/apps/qutebrowser.svg"
|
||||||
|
|
||||||
# Install scripts
|
# Install scripts
|
||||||
sed -i "s,/usr/bin/qutebrowser,$out/bin/qutebrowser,g" scripts/open_url_in_instance.sh
|
sed -i "s,/usr/bin/,$out/bin/,g" scripts/open_url_in_instance.sh
|
||||||
install -Dm755 -t "$out/share/qutebrowser/scripts/" scripts/open_url_in_instance.sh
|
install -Dm755 -t "$out/share/qutebrowser/scripts/" $(find scripts -type f)
|
||||||
install -Dm755 -t "$out/share/qutebrowser/userscripts/" misc/userscripts/*
|
install -Dm755 -t "$out/share/qutebrowser/userscripts/" misc/userscripts/*
|
||||||
|
|
||||||
# Install and patch python scripts
|
# Patch python scripts
|
||||||
buildPythonPath "$out $propagatedBuildInputs"
|
buildPythonPath "$out $propagatedBuildInputs"
|
||||||
for i in importer dictcli keytester utils; do
|
scripts=$(grep -rl python "$out"/share/qutebrowser/{user,}scripts/)
|
||||||
install -Dm755 -t "$out/share/qutebrowser/scripts/" scripts/$i.py
|
for i in $scripts; do
|
||||||
patchPythonScript "$out/share/qutebrowser/scripts/$i.py"
|
patchPythonScript "$i"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -97,10 +100,10 @@ in python3Packages.buildPythonApplication rec {
|
|||||||
wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
|
wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/The-Compiler/qutebrowser;
|
homepage = https://github.com/The-Compiler/qutebrowser;
|
||||||
description = "Keyboard-focused browser with a minimal GUI";
|
description = "Keyboard-focused browser with a minimal GUI";
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = [ stdenv.lib.maintainers.jagajaga ];
|
maintainers = with maintainers; [ jagajaga rnhmjoj ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user