From 887ad07236743d90e008561b2771770ccf4caf53 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sat, 15 Mar 2025 16:50:24 +0800 Subject: [PATCH] python312packages.petsc4py: do not build withFullDeps The `withFullDeps` flag was used to make petsc4py meet the requirements of downstream projects like Fenics and Firedrake. However, this flag breaks the build on other platforms if any external packages of PETSc fail. Therefore, I disabled this flag in petsc4py and made PETSc bundle some commonly used external packages by default. Users can still have a minimally featured PETSc by setting `withCommonDeps = false`. --- pkgs/by-name/pe/petsc/package.nix | 10 ++++++---- pkgs/top-level/python-packages.nix | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index c00d34d61006..69833766c963 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -21,13 +21,14 @@ pythonSupport ? false, # petsc python binding withExamples ? false, withFullDeps ? false, # full External libraries support + withCommonDeps ? true, # common External libraries support # External libraries options - withHdf5 ? true, - withMetis ? withFullDeps, - withParmetis ? false, # parmetis is unfree and should be enabled manualy - withPtscotch ? withFullDeps, + withHdf5 ? withCommonDeps, + withMetis ? withCommonDeps, withScalapack ? withFullDeps, + withParmetis ? withFullDeps, # parmetis is unfree + withPtscotch ? withFullDeps, withMumps ? withFullDeps, withP4est ? withFullDeps, @@ -41,6 +42,7 @@ pkg-config, p4est, }: +assert withFullDeps -> withCommonDeps; # This version of PETSc does not support a non-MPI p4est build assert withP4est -> (p4est.mpiSupport && mpiSupport); diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 216d02868456..6b6971212507 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10505,7 +10505,6 @@ self: super: with self; { python3 = python; python3Packages = self; pythonSupport = true; - withFullDeps = true; }); pex = callPackage ../development/python-modules/pex { };