From 2dcdcf9974e7b3d171d4a2af3d4dbea3d078d3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Wed, 26 Nov 2025 22:07:39 +0200 Subject: [PATCH] python3Packages.proton-vpn-local-agent: fix wheel build script for all architectures The upstream builds hardcoddes the wheel package build to x86-64. This commit patches that script to take into consideration the build architecture. --- .../python-modules/proton-vpn-local-agent/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/proton-vpn-local-agent/default.nix b/pkgs/development/python-modules/proton-vpn-local-agent/default.nix index 373fcdd04a91..8fcc2f597627 100644 --- a/pkgs/development/python-modules/proton-vpn-local-agent/default.nix +++ b/pkgs/development/python-modules/proton-vpn-local-agent/default.nix @@ -47,6 +47,14 @@ buildPythonPackage rec { rustPlatform.cargoCheckHook ]; + postPatch = '' + substituteInPlace scripts/build_wheel.py \ + --replace-fail 'ARCH = "x86_64"' \ + 'ARCH = "${stdenv.hostPlatform.uname.processor}"' \ + --replace-fail 'LIB_PATH = get_lib_path("x86_64-unknown-linux-gnu")' \ + 'LIB_PATH = get_lib_path("${stdenv.hostPlatform.config}")' + ''; + postBuild = '' ${python.interpreter} scripts/build_wheel.py mkdir -p ./dist