about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix b/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
index 75525b943445..c9563039b0a8 100644
--- a/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pyairvisual/default.nix
@@ -4,6 +4,7 @@
 , buildPythonPackage
 , certifi
 , fetchFromGitHub
+, fetchpatch
 , numpy
 , poetry-core
 , pygments
@@ -28,6 +29,15 @@ buildPythonPackage rec {
     hash = "sha256-+yqN3q+uA/v01uCguzUSoeCJK9lRmiiYn8d272+Dd2M=";
   };
 
+  patches = [
+    # https://github.com/bachya/pyairvisual/pull/298
+    (fetchpatch {
+      name = "clean-up-build-dependencies.patch";
+      url = "https://github.com/bachya/pyairvisual/commit/eb32beb7229a53ff81917cc417ed66b26aae47dd.patch";
+      hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace pyproject.toml --replace \
       'certifi = ">=2023.07.22"' \
@@ -46,6 +56,9 @@ buildPythonPackage rec {
     pysmb
   ];
 
+  # this lets tests bind to localhost in sandbox mode on macOS
+  __darwinAllowLocalNetworking = true;
+
   nativeCheckInputs = [
     aresponses
     pytest-aiohttp