From e0c7eab0c660bdceb5c14314497349717bd394e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 14 Oct 2025 18:53:10 -0700 Subject: [PATCH] python3Packages.certbot: fix tests on Darwin --- pkgs/development/python-modules/certbot/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/certbot/default.nix b/pkgs/development/python-modules/certbot/default.nix index 6c3a4a19fcb3..8ea77476b22c 100644 --- a/pkgs/development/python-modules/certbot/default.nix +++ b/pkgs/development/python-modules/certbot/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, python, runCommand, @@ -19,6 +20,7 @@ pytest-xdist, pytestCheckHook, python-dateutil, + writeShellScriptBin, }: buildPythonPackage rec { @@ -59,6 +61,11 @@ buildPythonPackage rec { python-dateutil pytestCheckHook pytest-xdist + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + (writeShellScriptBin "sw_vers" '' + echo 'ProductVersion: 13.0' + '') ]; pytestFlags = [ @@ -71,6 +78,8 @@ buildPythonPackage rec { "test_lock_order" ]; + __darwinAllowLocalNetworking = true; + makeWrapperArgs = [ "--prefix PATH : ${dialog}/bin" ]; # certbot.withPlugins has a similar calling convention as python*.withPackages