Merge pull request #46556 from rnhmjoj/lastpass
qutebrowser: patch all python scripts
This commit is contained in:
commit
decd819911
@ -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 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchFromGitHub, six, pytest }:
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
||||||
|
, six, pytest, arrow
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "construct";
|
pname = "construct";
|
||||||
version = "2.8.16";
|
version = "2.9.45";
|
||||||
name = pname + "-" + version;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "construct";
|
owner = pname;
|
||||||
repo = "construct";
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0lzz1dy419n254qccch7yx4nkpwd0fsyjhnsnaf6ysgwzqxxv63j";
|
sha256 = "0ig66xrzswpkhhmw123p2nvr15a9lxz54a1fmycfdh09327c1d3y";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ six ];
|
propagatedBuildInputs = [ six ];
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytest arrow ];
|
||||||
|
|
||||||
|
# TODO: figure out missing dependencies
|
||||||
|
doCheck = false;
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
py.test -k 'not test_numpy' tests
|
py.test -k 'not test_numpy and not test_gallery' tests
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
26
pkgs/development/python-modules/pykeepass/default.nix
Normal file
26
pkgs/development/python-modules/pykeepass/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ lib, fetchPypi, buildPythonPackage
|
||||||
|
, lxml, pycryptodome, construct
|
||||||
|
, argon2_cffi, dateutil, enum34
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pykeepass";
|
||||||
|
version = "3.0.2";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1kfnh42nimsbdpwpny2c9df82b2n4fb5fagh54ck06f3x483vd90";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
lxml pycryptodome construct
|
||||||
|
argon2_cffi dateutil enum34
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/pschmitt/pykeepass;
|
||||||
|
description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
26
pkgs/development/python-modules/pyreadability/default.nix
Normal file
26
pkgs/development/python-modules/pyreadability/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ lib, fetchPypi, buildPythonPackage
|
||||||
|
, requests, chardet, cssselect, lxml
|
||||||
|
, pytest
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "PyReadability";
|
||||||
|
version = "0.4.0";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1k6fq416pdmjcdqh6gdxl0y0k8kj1zlpzwp5574xsvsha18p2zpn";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ requests chardet cssselect lxml ];
|
||||||
|
|
||||||
|
# ModuleNotFoundError: No module named 'tests'
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/hyperlinkapp/python-readability;
|
||||||
|
description = "fast python port of arc90's readability tool, updated to match latest readability.js!";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
20
pkgs/development/python-modules/requests-file/default.nix
Normal file
20
pkgs/development/python-modules/requests-file/default.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ lib, fetchPypi, buildPythonPackage, requests, six }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "requests-file";
|
||||||
|
version = "1.4.3";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ requests six ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/dashea/requests-file;
|
||||||
|
description = "Transport adapter for fetching file:// URLs with the requests python library";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
24
pkgs/development/python-modules/tldextract/default.nix
Normal file
24
pkgs/development/python-modules/tldextract/default.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ lib, fetchPypi, buildPythonPackage
|
||||||
|
, requests, requests-file, idna, pytest
|
||||||
|
, responses
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "tldextract";
|
||||||
|
version = "2.2.0";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ requests requests-file idna ];
|
||||||
|
checkInputs = [ pytest responses ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/john-kurkowski/tldextract;
|
||||||
|
description = "Accurately separate the TLD from the registered domain and subdomains of a URL, using the Public Suffix List.";
|
||||||
|
license = lib.licenses.bsd3;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -469,6 +469,8 @@ in {
|
|||||||
|
|
||||||
pykerberos = callPackage ../development/python-modules/pykerberos { };
|
pykerberos = callPackage ../development/python-modules/pykerberos { };
|
||||||
|
|
||||||
|
pykeepass = callPackage ../development/python-modules/pykeepass { };
|
||||||
|
|
||||||
pymatgen = callPackage ../development/python-modules/pymatgen { };
|
pymatgen = callPackage ../development/python-modules/pymatgen { };
|
||||||
|
|
||||||
pymatgen-lammps = callPackage ../development/python-modules/pymatgen-lammps { };
|
pymatgen-lammps = callPackage ../development/python-modules/pymatgen-lammps { };
|
||||||
@ -2010,6 +2012,8 @@ in {
|
|||||||
|
|
||||||
requests-cache = callPackage ../development/python-modules/requests-cache { };
|
requests-cache = callPackage ../development/python-modules/requests-cache { };
|
||||||
|
|
||||||
|
requests-file = callPackage ../development/python-modules/requests-file { };
|
||||||
|
|
||||||
requests-kerberos = callPackage ../development/python-modules/requests-kerberos { };
|
requests-kerberos = callPackage ../development/python-modules/requests-kerberos { };
|
||||||
|
|
||||||
requests-unixsocket = callPackage ../development/python-modules/requests-unixsocket {};
|
requests-unixsocket = callPackage ../development/python-modules/requests-unixsocket {};
|
||||||
@ -11153,6 +11157,8 @@ in {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pyreadability = callPackage ../development/python-modules/pyreadability { };
|
||||||
|
|
||||||
pyscss = buildPythonPackage rec {
|
pyscss = buildPythonPackage rec {
|
||||||
name = "pyScss-${version}";
|
name = "pyScss-${version}";
|
||||||
version = "1.3.5";
|
version = "1.3.5";
|
||||||
@ -17085,6 +17091,8 @@ EOF
|
|||||||
|
|
||||||
textacy = callPackage ../development/python-modules/textacy { };
|
textacy = callPackage ../development/python-modules/textacy { };
|
||||||
|
|
||||||
|
tldextract = callPackage ../development/python-modules/tldextract { };
|
||||||
|
|
||||||
pyemd = callPackage ../development/python-modules/pyemd { };
|
pyemd = callPackage ../development/python-modules/pyemd { };
|
||||||
|
|
||||||
pulp = callPackage ../development/python-modules/pulp { };
|
pulp = callPackage ../development/python-modules/pulp { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user