From df57e1cc3eba41fe8647af61f74838c5ceca4ba3 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Mon, 13 Jan 2025 22:19:58 +0100 Subject: [PATCH 01/10] OWNERS: Change ownership of pkgs-lib --- ci/OWNERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/OWNERS b/ci/OWNERS index 45cd1a2b621a..9ddaec0a5afd 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -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 From ad10463e3b71b15c2b97d0bb6e5184d9ebcbb948 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Jan 2025 23:49:02 +0000 Subject: [PATCH 02/10] kodiPackages.visualization-pictureit: 20.2.0 -> 21.0.1 --- .../video/kodi/addons/visualization-pictureit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-pictureit/default.nix b/pkgs/applications/video/kodi/addons/visualization-pictureit/default.nix index df53b1e5489d..7fe93c76e200 100644 --- a/pkgs/applications/video/kodi/addons/visualization-pictureit/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-pictureit/default.nix @@ -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 = [ From 8f612f1ac9e56621b416e5038023a960eca1bc7c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Jan 2025 23:54:30 +0000 Subject: [PATCH 03/10] kodiPackages.visualization-waveform: 20.2.1 -> 21.0.1 --- .../video/kodi/addons/visualization-waveform/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-waveform/default.nix b/pkgs/applications/video/kodi/addons/visualization-waveform/default.nix index ccb3735425ae..e1464f9a445a 100644 --- a/pkgs/applications/video/kodi/addons/visualization-waveform/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-waveform/default.nix @@ -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 = [ From 41a52d394cbd642feedc5342510903b84ed1661e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 18 Jan 2025 23:56:34 +0000 Subject: [PATCH 04/10] kodiPackages.visualization-fishbmc: 20.2.0 -> 21.0.1 --- .../video/kodi/addons/visualization-fishbmc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-fishbmc/default.nix b/pkgs/applications/video/kodi/addons/visualization-fishbmc/default.nix index 7a54d749e3fe..4eb15356d236 100644 --- a/pkgs/applications/video/kodi/addons/visualization-fishbmc/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-fishbmc/default.nix @@ -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 = [ From 469a0aa1be5bac27b61747f64ddbfa7279d15a5b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 19 Jan 2025 00:24:09 +0000 Subject: [PATCH 05/10] kodiPackages.visualization-goom: 20.1.1 -> 21.0.1 --- .../video/kodi/addons/visualization-goom/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-goom/default.nix b/pkgs/applications/video/kodi/addons/visualization-goom/default.nix index da5ee17c0ee5..9bf4477fe2d3 100644 --- a/pkgs/applications/video/kodi/addons/visualization-goom/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-goom/default.nix @@ -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 = [ From 3a0ff932bac4ed160cb37e4566b55bf7b5f09489 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 19 Jan 2025 01:14:31 +0000 Subject: [PATCH 06/10] kodiPackages.controller-topology-project: 1.0.0 -> 1.0.1 --- .../video/kodi/addons/controller-topology-project/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/controller-topology-project/default.nix b/pkgs/applications/video/kodi/addons/controller-topology-project/default.nix index e060ee1e03bf..cb6028325f5b 100644 --- a/pkgs/applications/video/kodi/addons/controller-topology-project/default.nix +++ b/pkgs/applications/video/kodi/addons/controller-topology-project/default.nix @@ -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 = '' From 50928c6f0569e929de9a8375f275493114a991bf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 19 Jan 2025 02:02:37 +0000 Subject: [PATCH 07/10] kodiPackages.visualization-shadertoy: 20.3.0 -> 21.0.2 --- .../video/kodi/addons/visualization-shadertoy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-shadertoy/default.nix b/pkgs/applications/video/kodi/addons/visualization-shadertoy/default.nix index 399674ee40fa..77a871c967ad 100644 --- a/pkgs/applications/video/kodi/addons/visualization-shadertoy/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-shadertoy/default.nix @@ -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 = [ From 625bad9da2ecd957fcf059114957363a8672f9d8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 19 Jan 2025 02:08:25 +0000 Subject: [PATCH 08/10] kodiPackages.visualization-spectrum: 20.2.0 -> 21.0.2 --- .../video/kodi/addons/visualization-spectrum/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/visualization-spectrum/default.nix b/pkgs/applications/video/kodi/addons/visualization-spectrum/default.nix index 19f9c2f0e6bd..6afbca9ca4a9 100644 --- a/pkgs/applications/video/kodi/addons/visualization-spectrum/default.nix +++ b/pkgs/applications/video/kodi/addons/visualization-spectrum/default.nix @@ -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 = [ From 84b216c2a6f459fd7008b2eb8abdaf98851a6b04 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 19 Jan 2025 18:41:58 +0300 Subject: [PATCH 09/10] nixos/test-driver: fix OCR I don't know why it doesn't want to do TIFF now, but there's also absolutely no reason for it to be TIFF anyway, so let's just use an image format that is actually sane. --- nixos/lib/test-driver/src/test_driver/machine.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine.py b/nixos/lib/test-driver/src/test_driver/machine.py index b554f7316779..7e335f7f1c56 100644 --- a/nixos/lib/test-driver/src/test_driver/machine.py +++ b/nixos/lib/test-driver/src/test_driver/machine.py @@ -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}") From 8f2bc9842e371f6d93319d10553ebd24fa9b59f1 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Fri, 27 Oct 2023 19:50:03 +1300 Subject: [PATCH 10/10] nixos/test-driver: Use consistent naming and types Specifies the "last try" parameter in all methods called by `retry`. Doing this clarifies its presence, and makes it easier to use it in the future if needed. --- .../test-driver/src/test_driver/machine.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine.py b/nixos/lib/test-driver/src/test_driver/machine.py index b554f7316779..257399cb1150 100644 --- a/nixos/lib/test-driver/src/test_driver/machine.py +++ b/nixos/lib/test-driver/src/test_driver/machine.py @@ -352,7 +352,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 +637,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 +652,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 +712,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 +739,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 +754,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 +774,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 +791,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 +984,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 +1008,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 +1154,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"'