Merge master into staging-next
This commit is contained in:
@@ -60,10 +60,9 @@
|
||||
/pkgs/build-support/setup-hooks @Ericson2314
|
||||
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
|
||||
/pkgs/by-name/au/auto-patchelf @layus
|
||||
/pkgs/pkgs-lib @infinisil
|
||||
|
||||
## Format generators/serializers
|
||||
/pkgs/pkgs-lib/formats/libconfig @h7x4
|
||||
/pkgs/pkgs-lib/formats/hocon @h7x4
|
||||
/pkgs/pkgs-lib @Stunkymonkey @h7x4
|
||||
|
||||
# Nixpkgs build-support
|
||||
/pkgs/build-support/writers @lassulus @Profpatsch
|
||||
|
||||
@@ -105,14 +105,16 @@ def _perform_ocr_on_screenshot(
|
||||
|
||||
tess_args = "-c debug_file=/dev/null --psm 11"
|
||||
|
||||
cmd = f"convert {magick_args} '{screenshot_path}' 'tiff:{screenshot_path}.tiff'"
|
||||
cmd = f"magick convert {magick_args} '{screenshot_path}' '{screenshot_path}.png'"
|
||||
ret = subprocess.run(cmd, shell=True, capture_output=True)
|
||||
if ret.returncode != 0:
|
||||
raise Exception(f"TIFF conversion failed with exit code {ret.returncode}")
|
||||
raise Exception(
|
||||
f"Image processing failed with exit code {ret.returncode}, stdout: {ret.stdout.decode()}, stderr: {ret.stderr.decode()}"
|
||||
)
|
||||
|
||||
model_results = []
|
||||
for model_id in model_ids:
|
||||
cmd = f"tesseract '{screenshot_path}.tiff' - {tess_args} --oem '{model_id}'"
|
||||
cmd = f"tesseract '{screenshot_path}.png' - {tess_args} --oem '{model_id}'"
|
||||
ret = subprocess.run(cmd, shell=True, capture_output=True)
|
||||
if ret.returncode != 0:
|
||||
raise Exception(f"OCR failed with exit code {ret.returncode}")
|
||||
@@ -352,7 +354,7 @@ class Machine:
|
||||
timing out.
|
||||
"""
|
||||
|
||||
def check_active(_: Any) -> bool:
|
||||
def check_active(_last_try: bool) -> bool:
|
||||
state = self.get_unit_property(unit, "ActiveState", user)
|
||||
if state == "failed":
|
||||
raise Exception(f'unit "{unit}" reached state "{state}"')
|
||||
@@ -637,7 +639,7 @@ class Machine:
|
||||
"""
|
||||
output = ""
|
||||
|
||||
def check_success(_: Any) -> bool:
|
||||
def check_success(_last_try: bool) -> bool:
|
||||
nonlocal output
|
||||
status, output = self.execute(command, timeout=timeout)
|
||||
return status == 0
|
||||
@@ -652,7 +654,7 @@ class Machine:
|
||||
"""
|
||||
output = ""
|
||||
|
||||
def check_failure(_: Any) -> bool:
|
||||
def check_failure(_last_try: bool) -> bool:
|
||||
nonlocal output
|
||||
status, output = self.execute(command, timeout=timeout)
|
||||
return status != 0
|
||||
@@ -712,9 +714,9 @@ class Machine:
|
||||
"""
|
||||
matcher = re.compile(regexp)
|
||||
|
||||
def tty_matches(last: bool) -> bool:
|
||||
def tty_matches(last_try: bool) -> bool:
|
||||
text = self.get_tty_text(tty)
|
||||
if last:
|
||||
if last_try:
|
||||
self.log(
|
||||
f"Last chance to match /{regexp}/ on TTY{tty}, "
|
||||
f"which currently contains: {text}"
|
||||
@@ -739,7 +741,7 @@ class Machine:
|
||||
Waits until the file exists in the machine's file system.
|
||||
"""
|
||||
|
||||
def check_file(_: Any) -> bool:
|
||||
def check_file(_last_try: bool) -> bool:
|
||||
status, _ = self.execute(f"test -e {filename}")
|
||||
return status == 0
|
||||
|
||||
@@ -754,7 +756,7 @@ class Machine:
|
||||
(default `localhost`).
|
||||
"""
|
||||
|
||||
def port_is_open(_: Any) -> bool:
|
||||
def port_is_open(_last_try: bool) -> bool:
|
||||
status, _ = self.execute(f"nc -z {addr} {port}")
|
||||
return status == 0
|
||||
|
||||
@@ -774,7 +776,7 @@ class Machine:
|
||||
"-uU" if is_datagram else "-U",
|
||||
]
|
||||
|
||||
def socket_is_open(_: Any) -> bool:
|
||||
def socket_is_open(_last_try: bool) -> bool:
|
||||
status, _ = self.execute(f"nc {' '.join(nc_flags)} {addr}")
|
||||
return status == 0
|
||||
|
||||
@@ -791,7 +793,7 @@ class Machine:
|
||||
(default `localhost`).
|
||||
"""
|
||||
|
||||
def port_is_closed(_: Any) -> bool:
|
||||
def port_is_closed(_last_try: bool) -> bool:
|
||||
status, _ = self.execute(f"nc -z {addr} {port}")
|
||||
return status != 0
|
||||
|
||||
@@ -984,13 +986,13 @@ class Machine:
|
||||
:::
|
||||
"""
|
||||
|
||||
def screen_matches(last: bool) -> bool:
|
||||
def screen_matches(last_try: bool) -> bool:
|
||||
variants = self.get_screen_text_variants()
|
||||
for text in variants:
|
||||
if re.search(regex, text) is not None:
|
||||
return True
|
||||
|
||||
if last:
|
||||
if last_try:
|
||||
self.log(f"Last OCR attempt failed. Text was: {variants}")
|
||||
|
||||
return False
|
||||
@@ -1008,7 +1010,7 @@ class Machine:
|
||||
# to match multiline regexes.
|
||||
console = io.StringIO()
|
||||
|
||||
def console_matches(_: Any) -> bool:
|
||||
def console_matches(_last_try: bool) -> bool:
|
||||
nonlocal console
|
||||
try:
|
||||
# This will return as soon as possible and
|
||||
@@ -1154,7 +1156,7 @@ class Machine:
|
||||
Wait until it is possible to connect to the X server.
|
||||
"""
|
||||
|
||||
def check_x(_: Any) -> bool:
|
||||
def check_x(_last_try: bool) -> bool:
|
||||
cmd = (
|
||||
"journalctl -b SYSLOG_IDENTIFIER=systemd | "
|
||||
+ 'grep "Reached target Current graphical"'
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
let
|
||||
drv = stdenv.mkDerivation rec {
|
||||
pname = "controller-topology-project";
|
||||
version = "1.0.0";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kodi-game";
|
||||
repo = "controller-topology-project";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-6g4dyR34b0YgxlzRRS2C/gY3wjlO9MMYEB2fHLSCqC4=";
|
||||
sha256 = "sha256-NRoI28LqXbsF6Icym98SWLHNl+WD8TsJ0P+ELf/JhyQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-fishbmc";
|
||||
namespace = "visualization.fishbmc";
|
||||
version = "20.2.0";
|
||||
version = "21.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-MgeSIKAy0N2NMGsU/15tKtDb34CROjcMaKjGyySl9Z0=";
|
||||
hash = "sha256-JAiWkW9iaOq+Q2tArxJ+S7sXQM2K010uT09j30rTY0I=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-goom";
|
||||
namespace = "visualization.goom";
|
||||
version = "20.1.1";
|
||||
version = "21.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-TxXqJQdPT1+3DwAJv0F2Hfksh+ZV4QjfOnp4/k53GpQ=";
|
||||
hash = "sha256-Cu0XRv2iU35bakbS5JkjSYAW5Enra1gt1I0sebcapx4=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-pictureit";
|
||||
namespace = "visualization.pictureit";
|
||||
version = "20.2.0";
|
||||
version = "21.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-mQDPjpsxStU01H2XJKnX183KAHG+O1CH8JOmApMmwMc=";
|
||||
hash = "sha256-0soMNqff/aVANDFORL3mqUUpi2BWmauUtE4EBr3QwlI=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-shadertoy";
|
||||
namespace = "visualization.shadertoy";
|
||||
version = "20.3.0";
|
||||
version = "21.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-PaHbEcB4gCC8gUzc7T49msI8f0xa2iXqSaYW/eqD8yw=";
|
||||
hash = "sha256-M70WQL4BqFI4LMFLBXlupuXxRkbTqA0OocYlCbY28VQ=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-spectrum";
|
||||
namespace = "visualization.spectrum";
|
||||
version = "20.2.0";
|
||||
version = "21.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-rl6eydHv0g646H7478UQboVp/OrKExQYJOiaVDeDRhE=";
|
||||
hash = "sha256-8yGmZeLJ8AdT17yqYVxYbmkZ6DqhlCyblbTUzf8MhE4=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
buildKodiBinaryAddon rec {
|
||||
pname = "visualization-waveform";
|
||||
namespace = "visualization.waveform";
|
||||
version = "20.2.1";
|
||||
version = "21.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xbmc";
|
||||
repo = namespace;
|
||||
rev = "${version}-${rel}";
|
||||
hash = "sha256-e1SIpMmfnS92X4f114MKch4o9Ke80aIzw6OQPrEb8d0=";
|
||||
hash = "sha256-ocLiDt9Fvwb/KvCsULyWRCNK0vOGMh/r88PRn1WYyXs=";
|
||||
};
|
||||
|
||||
extraBuildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user