From 17d6f0757eb6211f17ec5b442dde43443310d4a8 Mon Sep 17 00:00:00 2001 From: Alexis Praga Date: Sat, 16 May 2026 17:16:19 +0200 Subject: [PATCH] hap-py: fix python3 compatibility pipes is no longer supported in python3 and require a change of imports. --- pkgs/by-name/ha/hap-py/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ha/hap-py/package.nix b/pkgs/by-name/ha/hap-py/package.nix index cba65d18d0ef..01bbb72a7572 100644 --- a/pkgs/by-name/ha/hap-py/package.nix +++ b/pkgs/by-name/ha/hap-py/package.nix @@ -67,6 +67,11 @@ stdenv.mkDerivation (finalAttrs: { # Insert missing include for uint64_t sed -i '/#include /a #include ' src/c++/include/helpers/Roc.hh + + # pipes module was removed in Python 3.13; shlex.quote is the replacement + find src/python -name "*.py" -exec sed -i \ + -e 's/import pipes/import shlex/' \ + -e 's/pipes\.quote/shlex.quote/g' {} \; ''; patches = [