From 37582d6019911910bfc185151a4165936cf5c44d Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Fri, 20 Dec 2024 01:45:02 -0800 Subject: [PATCH 1/2] python313Packages.astropy: fix clang build Parts of the build compile with -Werror and the build also passes in -fno-strict-overflow which generates an unused command line argument warning which causes the build to fail when -Werror is present. Add -Wno-error=unused-command-line-argument to ignore. --- pkgs/development/python-modules/astropy/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index 4e26f583b2f9..ef024251b855 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -62,6 +62,10 @@ buildPythonPackage rec { hash = "sha256-6S18n+6G6z34cU5d1Bu/nxY9ND4aGD2Vv2vQnkMTyUA="; }; + env = lib.optionalAttrs stdenv.cc.isClang { + NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument"; + }; + build-system = [ cython extension-helpers From bba74a96d1d8edc18737d21a1052af69faf98e67 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Fri, 20 Dec 2024 03:08:14 -0800 Subject: [PATCH 2/2] python313Packages.astropy: fix tests in darwin sandbox __darwinAllowLocalNetworking = true; is required --- pkgs/development/python-modules/astropy/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index ef024251b855..4f5586f9aa21 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -130,6 +130,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "astropy" ]; + __darwinAllowLocalNetworking = true; + # Not running it inside the build directory. See: # https://github.com/astropy/astropy/issues/15316#issuecomment-1722190547 preCheck = ''