From 9fea0529e5d3d19a37463ea66e53845d020b9c5c Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Fri, 21 Mar 2025 16:08:09 -0300 Subject: [PATCH 01/22] ISSUE_TEMPLATES: remove the package request template Signed-off-by: Fernando Rodrigues --- .github/ISSUE_TEMPLATE/05_package_request.yml | 108 ------------------ ...date_request.yml => 05_update_request.yml} | 0 ...dule_request.yml => 06_module_request.yml} | 0 ...rt_request.yml => 07_backport_request.yml} | 0 ...quest.yml => 08_documentation_request.yml} | 0 ...kage.yml => 09_unreproducible_package.yml} | 0 6 files changed, 108 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/05_package_request.yml rename .github/ISSUE_TEMPLATE/{06_update_request.yml => 05_update_request.yml} (100%) rename .github/ISSUE_TEMPLATE/{07_module_request.yml => 06_module_request.yml} (100%) rename .github/ISSUE_TEMPLATE/{08_backport_request.yml => 07_backport_request.yml} (100%) rename .github/ISSUE_TEMPLATE/{09_documentation_request.yml => 08_documentation_request.yml} (100%) rename .github/ISSUE_TEMPLATE/{10_unreproducible_package.yml => 09_unreproducible_package.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/05_package_request.yml b/.github/ISSUE_TEMPLATE/05_package_request.yml deleted file mode 100644 index b73360a91cb4..000000000000 --- a/.github/ISSUE_TEMPLATE/05_package_request.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: "Request: new package" -description: "Create a package request for software that is not yet included in Nixpkgs." -title: "Package request: PACKAGENAME" -labels: ["0.kind: enhancement", "0.kind: packaging request", "9.needs: package (new)"] -body: - - type: "markdown" - attributes: - value: | -

- - - - - NixOS logo - - -

- - Welcome to Nixpkgs. Please replace the **`Package request: PACKAGENAME`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)). - - > [!TIP] - > For instance, if you were filing a request against the missing `hello` package, your title would be as follows: - > `Package request: hello` - - --- - - type: "textarea" - id: "description" - attributes: - label: "Describe the package" - description: "Please include a clear and concise description of what the package is." - validations: - required: true - - type: "input" - id: "homepage" - attributes: - label: "Upstream homepage" - description: "Please copy and paste a link to the package's homepage." - validations: - required: true - - type: "input" - id: "source" - attributes: - label: "Source URL" - description: "Please copy and paste a link to the package's source code or binary download page." - validations: - required: true - - type: "input" - id: "license" - attributes: - label: "License" - description: "Please indicate the package's license. If the package has no license, or the source code is not public, please indicate the package is `unfree`." - validations: - required: true - - type: "dropdown" - id: "platforms" - attributes: - label: "Platforms" - description: "Please indicate the platforms this package compiles for. `darwin` refers to macOS. `Exotic` refers to uncommon platforms like RISC-V or 32-bit ARM; please mention in the 'Additional Context' section below if this package is supposed to compile for such exotic platforms." - multiple: true - options: - - "x86_64-linux" - - "aarch64-linux" - - "x86_64-darwin" - - "aarch64-darwin" - - "Exotic" - - type: "textarea" - id: "additional-context" - attributes: - label: "Additional context" - description: "Add any other context about the proposed module here." - validations: - required: false - - type: "checkboxes" - id: "sanity-check" - attributes: - label: "I assert that this issue is relevant for Nixpkgs" - options: - - label: "I assert that this package does not yet exist in an [open pull request](https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+is%3Apr+label%3A%228.has%3A+package+%28new%29%22) or in [Nixpkgs Unstable](https://search.nixos.org/packages?channel=unstable)." - required: true - - label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+label%3A%220.kind%3A+packaging+request%22)." - required: true - - label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it." - required: true - - type: "markdown" - attributes: - value: | - # Thank you for helping improve Nixpkgs! - - --- - - type: "textarea" - id: "prioritisation" - attributes: - label: "For this package's maintainers:" - description: | - **Please do not modify this text area!** - - This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction and also reminds them to tag this issue in their pull requests. - This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important. - value: | - - Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.) - - --- - - Add a :+1: [reaction] to [issues you find important]. - - [reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/ - [issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc diff --git a/.github/ISSUE_TEMPLATE/06_update_request.yml b/.github/ISSUE_TEMPLATE/05_update_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/06_update_request.yml rename to .github/ISSUE_TEMPLATE/05_update_request.yml diff --git a/.github/ISSUE_TEMPLATE/07_module_request.yml b/.github/ISSUE_TEMPLATE/06_module_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/07_module_request.yml rename to .github/ISSUE_TEMPLATE/06_module_request.yml diff --git a/.github/ISSUE_TEMPLATE/08_backport_request.yml b/.github/ISSUE_TEMPLATE/07_backport_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/08_backport_request.yml rename to .github/ISSUE_TEMPLATE/07_backport_request.yml diff --git a/.github/ISSUE_TEMPLATE/09_documentation_request.yml b/.github/ISSUE_TEMPLATE/08_documentation_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/09_documentation_request.yml rename to .github/ISSUE_TEMPLATE/08_documentation_request.yml diff --git a/.github/ISSUE_TEMPLATE/10_unreproducible_package.yml b/.github/ISSUE_TEMPLATE/09_unreproducible_package.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/10_unreproducible_package.yml rename to .github/ISSUE_TEMPLATE/09_unreproducible_package.yml From 32d4da5cbf64d65979dca96553197290dc2cb1a2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 22 Mar 2025 17:26:21 +0000 Subject: [PATCH 02/22] autobrr: 1.59.0 -> 1.60.0 --- pkgs/by-name/au/autobrr/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/au/autobrr/package.nix b/pkgs/by-name/au/autobrr/package.nix index 13d5453eda32..89d456a0cc9e 100644 --- a/pkgs/by-name/au/autobrr/package.nix +++ b/pkgs/by-name/au/autobrr/package.nix @@ -13,12 +13,12 @@ let pname = "autobrr"; - version = "1.59.0"; + version = "1.60.0"; src = fetchFromGitHub { owner = "autobrr"; repo = "autobrr"; tag = "v${version}"; - hash = "sha256-etVhOgE8H8bWuraBepwDSZZzo9Xl819w2sT+UwpUVjM="; + hash = "sha256-HaNaVxOtlzquKvWmUzUELtv0ZQZ+C/G5ni9/QbOlAh4="; }; autobrr-web = stdenvNoCC.mkDerivation { From 7605633c219a4b3900b49cb1aaf3dafd562d80dc Mon Sep 17 00:00:00 2001 From: emilylange Date: Fri, 28 Mar 2025 14:35:35 +0100 Subject: [PATCH 03/22] python313Packages.msmart-ng: 2025.3.1 -> 2025.3.3 https://github.com/mill1000/midea-msmart/releases/tag/2025.3.2 https://github.com/mill1000/midea-msmart/releases/tag/2025.3.3 This also reverts the pep639 license format change in pyproject.toml because setuptools has yet to implement pep639. --- .../python-modules/msmart-ng/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/msmart-ng/default.nix b/pkgs/development/python-modules/msmart-ng/default.nix index 0f01c755834f..8d1983474e18 100644 --- a/pkgs/development/python-modules/msmart-ng/default.nix +++ b/pkgs/development/python-modules/msmart-ng/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch2, # build-system setuptools, @@ -17,16 +18,27 @@ buildPythonPackage rec { pname = "msmart-ng"; - version = "2025.3.1"; + version = "2025.3.3"; pyproject = true; src = fetchFromGitHub { owner = "mill1000"; repo = "midea-msmart"; tag = version; - hash = "sha256-hTYqRJn/ixseHHezfTOG0UzdQmnpn4hACijYOMtwtT8="; + hash = "sha256-M8Gl6QXj0tRN7VFDhop47vINk8MeWSyCJ9bboo3j8Go="; }; + patches = [ + (fetchpatch2 { + # Revert until setuptools + # implements support for . + name = "revert-pyproject-license-declaration-pep639-syntax.patch"; + url = "https://github.com/mill1000/midea-msmart/commit/e5d6a982135e497c251095e421d3de4686f36056.patch?full_index=1"; + hash = "sha256-+mxmFGZd04MZY2C5eo4k1lFoXsM8XyeJNazShnjAseE="; + revert = true; + }) + ]; + build-system = [ setuptools setuptools-scm From c3b36902e41b61f7514182138cd121fda749d33b Mon Sep 17 00:00:00 2001 From: emilylange Date: Fri, 28 Mar 2025 14:38:20 +0100 Subject: [PATCH 04/22] home-assistant-custom-components.midea_ac: 2025.3.0 -> 2025.3.1 https://github.com/mill1000/midea-ac-py/releases/tag/2025.3.1 --- .../home-assistant/custom-components/midea_ac/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix b/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix index 8588b6045e72..9befc39ade5e 100644 --- a/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix +++ b/pkgs/servers/home-assistant/custom-components/midea_ac/package.nix @@ -8,13 +8,13 @@ buildHomeAssistantComponent rec { owner = "mill1000"; domain = "midea_ac"; - version = "2025.3.0"; + version = "2025.3.1"; src = fetchFromGitHub { owner = "mill1000"; repo = "midea-ac-py"; tag = version; - hash = "sha256-UJS9z+t+Tb/w7yRHKXJ6HoQ4uS1guM8PYl0OcLz4EJM="; + hash = "sha256-oO+t0my72PwWWUAzr8blA3Q8uJyICZNcfoOHsLFL3MQ="; }; dependencies = [ msmart-ng ]; From 762d3dfa72b17524f43b070bcf2c743a668fab8e Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 18:17:43 +0800 Subject: [PATCH 05/22] petsc: reorder inputs --- pkgs/by-name/pe/petsc/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index d31359143af8..b1cbd689f197 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -2,16 +2,14 @@ lib, stdenv, fetchzip, - gfortran, replaceVars, - python3, - python3Packages, - blas, - lapack, - zlib, # propagated by p4est but required by petsc + bash, + pkg-config, + gfortran, mpi, # generic mpi dependency mpiCheckPhaseHook, - bash, + python3, + python3Packages, # Build options petsc-optimized ? true, @@ -33,14 +31,16 @@ withP4est ? withFullDeps, # External libraries + blas, + lapack, hdf5-fortran-mpi, metis, parmetis, scotch, scalapack, mumps_par, - pkg-config, p4est, + zlib, # propagated by p4est but required by petsc }: assert withFullDeps -> withCommonDeps; From 795f035bb7fb988018e9c77e87f8bc74ab7f39b6 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 18:53:50 +0800 Subject: [PATCH 06/22] petsc: use finalAttrs --- pkgs/by-name/pe/petsc/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index b1cbd689f197..7d7fe18a86db 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -54,12 +54,12 @@ assert withPtscotch -> mpiSupport; assert withScalapack -> mpiSupport; assert withMumps -> withScalapack; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "petsc"; version = "3.22.4"; src = fetchzip { - url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz"; + url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${finalAttrs.version}.tar.gz"; hash = "sha256-8WV1ylXytkhiNa7YpWSOIpSvzLCCjdVVe5SiGfhicas="; }; @@ -213,4 +213,4 @@ stdenv.mkDerivation rec { qbisi ]; }; -} +}) From 1f4f2e029214c3b4badd1166537767de25dadaf3 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 19:26:16 +0800 Subject: [PATCH 07/22] petsc: add fullDeps test --- pkgs/by-name/pe/petsc/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 7d7fe18a86db..8d682f86bbba 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -41,6 +41,9 @@ mumps_par, p4est, zlib, # propagated by p4est but required by petsc + + # Used in passthru.tests + petsc, }: assert withFullDeps -> withCommonDeps; @@ -199,6 +202,12 @@ stdenv.mkDerivation (finalAttrs: { passthru = { inherit mpiSupport pythonSupport; + tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { + fullDeps = petsc.override { + withFullDeps = true; + withParmetis = false; + }; + }; }; setupHook = ./setup-hook.sh; From e477c1f0b900848fb8aebb051982abd1a28c20c5 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 19:29:43 +0800 Subject: [PATCH 08/22] petsc: remove configure flag --with-hdf5-fortran-bindings=1 This option is only used when PETsc download and build hdf5 with fortran support for other project depend on petsc. PETsc does not need it. --- pkgs/by-name/pe/petsc/package.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 8d682f86bbba..af8be7de0743 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -150,7 +150,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals withHdf5 [ "--with-hdf5=1" - "--with-hdf5-fortran-bindings=1" "--with-hdf5-include=${lib.getDev hdf5-fortran-mpi}/include" "--with-hdf5-lib=[-L${lib.getLib hdf5-fortran-mpi}/lib,-lhdf5]" ] From f00965dcff5fd8557fc764cd8651b69574277659 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 19:40:43 +0800 Subject: [PATCH 09/22] petsc: remove unnecssary configure flags --- pkgs/by-name/pe/petsc/package.nix | 35 +++++++------------------------ 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index af8be7de0743..c58e18f00f92 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -122,37 +122,16 @@ stdenv.mkDerivation (finalAttrs: { "--with-cxx=mpicxx" "--with-fc=mpif90" ] - ++ lib.optionals withMetis [ - "--with-metis=1" - "--with-metis-dir=${metis}" - ] - ++ lib.optionals withParmetis [ - "--with-parmetis=1" - "--with-parmetis-dir=${parmetis}" - ] - ++ lib.optionals withPtscotch [ - "--with-ptscotch=1" - "--with-ptscotch-include=${lib.getDev scotch}/include" - "--with-ptscotch-lib=[-L${lib.getLib scotch}/lib,-lptscotch,-lptesmumps,-lptscotchparmetisv3,-lptscotcherr,-lesmumps,-lscotch,-lscotcherr]" - ] - ++ lib.optionals withScalapack [ - "--with-scalapack=1" - "--with-scalapack-dir=${scalapack}" - ] - ++ lib.optionals withMumps [ - "--with-mumps=1" - "--with-mumps-dir=${mumps_par}" - ] + ++ lib.optional withMetis "--with-metis=1" + ++ lib.optional withParmetis "--with-parmetis=1" + ++ lib.optional withPtscotch "--with-ptscotch=1" + ++ lib.optional withScalapack "--with-scalapack=1" + ++ lib.optional withMumps "--with-mumps=1" ++ lib.optionals withP4est [ "--with-p4est=1" - "--with-zlib-include=${lib.getDev zlib}/include" - "--with-zlib-lib=[-L${lib.getLib zlib}/lib,-lz]" - ] - ++ lib.optionals withHdf5 [ - "--with-hdf5=1" - "--with-hdf5-include=${lib.getDev hdf5-fortran-mpi}/include" - "--with-hdf5-lib=[-L${lib.getLib hdf5-fortran-mpi}/lib,-lhdf5]" + "--with-zlib=1" ] + ++ lib.optional withHdf5 "--with-hdf5=1" ++ lib.optionals petsc-optimized [ "--with-debugging=0" "COPTFLAGS=-O3" From 45b86ca411ab8768af40fb23b45d46e5d4d0a024 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 19:49:13 +0800 Subject: [PATCH 10/22] petsc: add withZlib option --- pkgs/by-name/pe/petsc/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index c58e18f00f92..6498635fd568 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -24,6 +24,7 @@ # External libraries options withHdf5 ? withCommonDeps, withMetis ? withCommonDeps, + withZlib ? withP4est, withScalapack ? withFullDeps, withParmetis ? withFullDeps, # parmetis is unfree withPtscotch ? withFullDeps, @@ -48,7 +49,7 @@ assert withFullDeps -> withCommonDeps; # This version of PETSc does not support a non-MPI p4est build -assert withP4est -> (p4est.mpiSupport && mpiSupport); +assert withP4est -> (p4est.mpiSupport && mpiSupport && withZlib); # Package parmetis depend on metis and mpi support assert withParmetis -> (withMetis && mpiSupport); @@ -86,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: { lapack ] ++ lib.optional withHdf5 hdf5-fortran-mpi + ++ lib.optional withZlib zlib ++ lib.optional withP4est p4est ++ lib.optional withMetis metis ++ lib.optional withParmetis parmetis @@ -127,10 +129,8 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withPtscotch "--with-ptscotch=1" ++ lib.optional withScalapack "--with-scalapack=1" ++ lib.optional withMumps "--with-mumps=1" - ++ lib.optionals withP4est [ - "--with-p4est=1" - "--with-zlib=1" - ] + ++ lib.optional withP4est "--with-p4est=1" + ++ lib.optional withZlib "--with-zlib=1" ++ lib.optional withHdf5 "--with-hdf5=1" ++ lib.optionals petsc-optimized [ "--with-debugging=0" From 0a50de12c97d36f3aac685e0af4578a16c3e0e2e Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 19:52:01 +0800 Subject: [PATCH 11/22] petsc: reorder configure flags --- pkgs/by-name/pe/petsc/package.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 6498635fd568..4877768a1c07 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -118,12 +118,19 @@ stdenv.mkDerivation (finalAttrs: { "--with-precision=${petsc-precision}" "--with-mpi=${if mpiSupport then "1" else "0"}" ] - ++ lib.optional pythonSupport "--with-petsc4py=1" ++ lib.optionals mpiSupport [ "--CC=mpicc" "--with-cxx=mpicxx" "--with-fc=mpif90" ] + ++ lib.optionals petsc-optimized [ + "--with-debugging=0" + "COPTFLAGS=-O3" + "FOPTFLAGS=-O3" + "CXXOPTFLAGS=-O3" + "CXXFLAGS=-O3" + ] + ++ lib.optional pythonSupport "--with-petsc4py=1" ++ lib.optional withMetis "--with-metis=1" ++ lib.optional withParmetis "--with-parmetis=1" ++ lib.optional withPtscotch "--with-ptscotch=1" @@ -131,14 +138,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withMumps "--with-mumps=1" ++ lib.optional withP4est "--with-p4est=1" ++ lib.optional withZlib "--with-zlib=1" - ++ lib.optional withHdf5 "--with-hdf5=1" - ++ lib.optionals petsc-optimized [ - "--with-debugging=0" - "COPTFLAGS=-O3" - "FOPTFLAGS=-O3" - "CXXOPTFLAGS=-O3" - "CXXFLAGS=-O3" - ]; + ++ lib.optional withHdf5 "--with-hdf5=1"; hardeningDisable = lib.optionals (!petsc-optimized) [ "fortify" From 62208f0a1b16be2ee2fb388fb3e347a1fb8bd1aa Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 20:04:19 +0800 Subject: [PATCH 12/22] petsc: add fortranSupport option --- pkgs/by-name/pe/petsc/package.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 4877768a1c07..0a2653f2dc5c 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -16,6 +16,7 @@ petsc-scalar-type ? "real", petsc-precision ? "double", mpiSupport ? true, + fortranSupport ? true, pythonSupport ? false, # petsc python binding withExamples ? false, withFullDeps ? false, # full External libraries support @@ -130,6 +131,7 @@ stdenv.mkDerivation (finalAttrs: { "CXXOPTFLAGS=-O3" "CXXFLAGS=-O3" ] + ++ lib.optional (!fortranSupport) "--with-fortran-bindings=0" ++ lib.optional pythonSupport "--with-petsc4py=1" ++ lib.optional withMetis "--with-metis=1" ++ lib.optional withParmetis "--with-parmetis=1" @@ -179,7 +181,11 @@ stdenv.mkDerivation (finalAttrs: { pythonImportsCheck = [ "petsc4py" ]; passthru = { - inherit mpiSupport pythonSupport; + inherit + mpiSupport + pythonSupport + fortranSupport + ; tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { fullDeps = petsc.override { withFullDeps = true; From a11a1f196bbb9787065464785c9750a84c9c9720 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 20:19:26 +0800 Subject: [PATCH 13/22] petsc: override external math libraries in scope petscPackages --- pkgs/by-name/pe/petsc/package.nix | 58 ++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 0a2653f2dc5c..85e0853d9bf0 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -1,5 +1,6 @@ { lib, + newScope, stdenv, fetchzip, replaceVars, @@ -35,12 +36,12 @@ # External libraries blas, lapack, - hdf5-fortran-mpi, + hdf5, metis, parmetis, scotch, scalapack, - mumps_par, + mumps, p4est, zlib, # propagated by p4est but required by petsc @@ -50,7 +51,7 @@ assert withFullDeps -> withCommonDeps; # This version of PETSc does not support a non-MPI p4est build -assert withP4est -> (p4est.mpiSupport && mpiSupport && withZlib); +assert withP4est -> (mpiSupport && withZlib); # Package parmetis depend on metis and mpi support assert withParmetis -> (withMetis && mpiSupport); @@ -59,6 +60,34 @@ assert withPtscotch -> mpiSupport; assert withScalapack -> mpiSupport; assert withMumps -> withScalapack; +let + petscPackages = lib.makeScope newScope (self: { + inherit + # global override options + mpiSupport + fortranSupport + pythonSupport + precision + ; + enableMpi = self.mpiSupport; + + petscPackages = self; + # external libraries + mpi = self.callPackage mpi.override { }; + blas = self.callPackage blas.override { }; + lapack = self.callPackage lapack.override { }; + hdf5 = self.callPackage hdf5.override { + fortran = gfortran; + cppSupport = !mpiSupport; + }; + metis = self.callPackage metis.override { }; + parmetis = self.callPackage parmetis.override { }; + scotch = self.callPackage scotch.override { }; + scalapack = self.callPackage scalapack.override { }; + mumps = self.callPackage mumps.override { }; + p4est = self.callPackage p4est.override { }; + }); +in stdenv.mkDerivation (finalAttrs: { pname = "petsc"; version = "3.22.4"; @@ -84,17 +113,17 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ - blas - lapack + petscPackages.blas + petscPackages.lapack ] - ++ lib.optional withHdf5 hdf5-fortran-mpi ++ lib.optional withZlib zlib - ++ lib.optional withP4est p4est - ++ lib.optional withMetis metis - ++ lib.optional withParmetis parmetis - ++ lib.optional withPtscotch scotch - ++ lib.optional withScalapack scalapack - ++ lib.optional withMumps mumps_par; + ++ lib.optional withHdf5 petscPackages.hdf5 + ++ lib.optional withP4est petscPackages.p4est + ++ lib.optional withMetis petscPackages.metis + ++ lib.optional withParmetis petscPackages.parmetis + ++ lib.optional withPtscotch petscPackages.scotch + ++ lib.optional withScalapack petscPackages.scalapack + ++ lib.optional withMumps petscPackages.mumps; propagatedBuildInputs = lib.optional pythonSupport python3Packages.numpy; @@ -186,6 +215,11 @@ stdenv.mkDerivation (finalAttrs: { pythonSupport fortranSupport ; + petscPackages = petscPackages.overrideScope ( + final: prev: { + petsc = finalAttrs.finalPackage; + } + ); tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { fullDeps = petsc.override { withFullDeps = true; From 9b40829f4da205eafd7947e5dbe9450ca1861f59 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 20:20:19 +0800 Subject: [PATCH 14/22] petsc: add serial tests --- pkgs/by-name/pe/petsc/package.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 85e0853d9bf0..712e56abba41 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -220,12 +220,18 @@ stdenv.mkDerivation (finalAttrs: { petsc = finalAttrs.finalPackage; } ); - tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { - fullDeps = petsc.override { - withFullDeps = true; - withParmetis = false; + tests = + { + serial = petsc.override { + mpiSupport = false; + }; + } + // lib.optionalAttrs stdenv.hostPlatform.isLinux { + fullDeps = petsc.override { + withFullDeps = true; + withParmetis = false; + }; }; - }; }; setupHook = ./setup-hook.sh; From f75b5cfe460b3a14d14b5e8677daa25f3e2da4c7 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 21:02:44 +0800 Subject: [PATCH 15/22] petsc: add mumps,scalapack,ptscotch to commonDeps in petsc --- pkgs/by-name/pe/petsc/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 712e56abba41..f6e392282e02 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -27,10 +27,10 @@ withHdf5 ? withCommonDeps, withMetis ? withCommonDeps, withZlib ? withP4est, - withScalapack ? withFullDeps, + withScalapack ? withCommonDeps && mpiSupport, withParmetis ? withFullDeps, # parmetis is unfree - withPtscotch ? withFullDeps, - withMumps ? withFullDeps, + withPtscotch ? withCommonDeps && mpiSupport, + withMumps ? withCommonDeps, withP4est ? withFullDeps, # External libraries @@ -58,7 +58,7 @@ assert withParmetis -> (withMetis && mpiSupport); assert withPtscotch -> mpiSupport; assert withScalapack -> mpiSupport; -assert withMumps -> withScalapack; +assert (withMumps && mpiSupport) -> withScalapack; let petscPackages = lib.makeScope newScope (self: { @@ -167,6 +167,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withPtscotch "--with-ptscotch=1" ++ lib.optional withScalapack "--with-scalapack=1" ++ lib.optional withMumps "--with-mumps=1" + ++ lib.optional (withMumps && !mpiSupport) "--with-mumps-serial=1" ++ lib.optional withP4est "--with-p4est=1" ++ lib.optional withZlib "--with-zlib=1" ++ lib.optional withHdf5 "--with-hdf5=1"; From 9b37979905769d2d6e28c58c0c9430a4f5f3e91a Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 21:35:21 +0800 Subject: [PATCH 16/22] petsc: add hypre,fftw,superlu,suitesparse to commonDeps --- pkgs/by-name/pe/petsc/package.nix | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index f6e392282e02..40049cbeacbe 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -32,6 +32,10 @@ withPtscotch ? withCommonDeps && mpiSupport, withMumps ? withCommonDeps, withP4est ? withFullDeps, + withHypre ? withCommonDeps && mpiSupport, + withFftw ? withCommonDeps, + withSuperLu ? withCommonDeps, + withSuitesparse ? withCommonDeps, # External libraries blas, @@ -44,6 +48,10 @@ mumps, p4est, zlib, # propagated by p4est but required by petsc + hypre, + fftw, + superlu, + suitesparse, # Used in passthru.tests petsc, @@ -59,6 +67,7 @@ assert withParmetis -> (withMetis && mpiSupport); assert withPtscotch -> mpiSupport; assert withScalapack -> mpiSupport; assert (withMumps && mpiSupport) -> withScalapack; +assert withHypre -> mpiSupport; let petscPackages = lib.makeScope newScope (self: { @@ -86,6 +95,10 @@ let scalapack = self.callPackage scalapack.override { }; mumps = self.callPackage mumps.override { }; p4est = self.callPackage p4est.override { }; + hypre = self.callPackage hypre.override { }; + fftw = self.callPackage fftw.override { }; + superlu = self.callPackage superlu.override { }; + suitesparse = self.callPackage suitesparse.override { }; }); in stdenv.mkDerivation (finalAttrs: { @@ -123,7 +136,11 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withParmetis petscPackages.parmetis ++ lib.optional withPtscotch petscPackages.scotch ++ lib.optional withScalapack petscPackages.scalapack - ++ lib.optional withMumps petscPackages.mumps; + ++ lib.optional withMumps petscPackages.mumps + ++ lib.optional withHypre petscPackages.hypre + ++ lib.optional withSuperLu petscPackages.superlu + ++ lib.optional withFftw petscPackages.fftw + ++ lib.optional withSuitesparse petscPackages.suitesparse; propagatedBuildInputs = lib.optional pythonSupport python3Packages.numpy; @@ -170,7 +187,11 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (withMumps && !mpiSupport) "--with-mumps-serial=1" ++ lib.optional withP4est "--with-p4est=1" ++ lib.optional withZlib "--with-zlib=1" - ++ lib.optional withHdf5 "--with-hdf5=1"; + ++ lib.optional withHdf5 "--with-hdf5=1" + ++ lib.optional withHypre "--with-hypre=1" + ++ lib.optional withSuperLu "--with-superlu=1" + ++ lib.optional withFftw "--with-fftw=1" + ++ lib.optional withSuitesparse "--with-suitesparse=1"; hardeningDisable = lib.optionals (!petsc-optimized) [ "fortify" From bf1af1c732bb8d4381f15b2e352067f549c4f3b3 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sun, 23 Mar 2025 21:41:27 +0800 Subject: [PATCH 17/22] petsc: change some inputs style from kebab-case to camelCase --- pkgs/by-name/pe/petsc/package.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 40049cbeacbe..225beef79e6f 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -13,9 +13,9 @@ python3Packages, # Build options - petsc-optimized ? true, - petsc-scalar-type ? "real", - petsc-precision ? "double", + debug ? false, + scalarType ? "real", + precision ? "double", mpiSupport ? true, fortranSupport ? true, pythonSupport ? false, # petsc python binding @@ -161,8 +161,8 @@ stdenv.mkDerivation (finalAttrs: { [ "--with-blas=1" "--with-lapack=1" - "--with-scalar-type=${petsc-scalar-type}" - "--with-precision=${petsc-precision}" + "--with-scalar-type=${scalarType}" + "--with-precision=${precision}" "--with-mpi=${if mpiSupport then "1" else "0"}" ] ++ lib.optionals mpiSupport [ @@ -170,7 +170,7 @@ stdenv.mkDerivation (finalAttrs: { "--with-cxx=mpicxx" "--with-fc=mpif90" ] - ++ lib.optionals petsc-optimized [ + ++ lib.optionals (!debug) [ "--with-debugging=0" "COPTFLAGS=-O3" "FOPTFLAGS=-O3" @@ -193,7 +193,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withFftw "--with-fftw=1" ++ lib.optional withSuitesparse "--with-suitesparse=1"; - hardeningDisable = lib.optionals (!petsc-optimized) [ + hardeningDisable = lib.optionals debug [ "fortify" "fortify3" ]; From 9f0a2d26fce4e188dfc4272f2db3044e81d1c74c Mon Sep 17 00:00:00 2001 From: qbisi Date: Mon, 24 Mar 2025 21:07:02 +0800 Subject: [PATCH 18/22] petsc: remove with lib in meta attrs --- pkgs/by-name/pe/petsc/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 225beef79e6f..617121aaf0d1 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -258,12 +258,12 @@ stdenv.mkDerivation (finalAttrs: { setupHook = ./setup-hook.sh; - meta = with lib; { + meta = { description = "Portable Extensible Toolkit for Scientific computation"; homepage = "https://petsc.org/release/"; - license = licenses.bsd2; + license = lib.licenses.bsd2; platforms = lib.platforms.unix; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ cburstedde qbisi ]; From 605ec77678e47441a008a743e16e57d82d5b6bb8 Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 2 Apr 2025 02:48:12 +0800 Subject: [PATCH 19/22] petsc: 3.22.4 -> 3.23.0 --- pkgs/by-name/pe/petsc/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 617121aaf0d1..517987db5b90 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -103,11 +103,11 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "petsc"; - version = "3.22.4"; + version = "3.23.0"; src = fetchzip { url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${finalAttrs.version}.tar.gz"; - hash = "sha256-8WV1ylXytkhiNa7YpWSOIpSvzLCCjdVVe5SiGfhicas="; + hash = "sha256-OcI4iyDOR0YTVV+JoOhbfutoW00EmfapNaMnD/JJFsI="; }; strictDeps = true; From 2a71140aba7402f794c61c2def4504e0f50ed807 Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 2 Apr 2025 03:03:22 +0800 Subject: [PATCH 20/22] petsc: fix ptscotch dependencies --- pkgs/by-name/pe/petsc/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index 517987db5b90..d394c69ce2c4 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -7,6 +7,7 @@ bash, pkg-config, gfortran, + bison, mpi, # generic mpi dependency mpiCheckPhaseHook, python3, @@ -26,7 +27,7 @@ # External libraries options withHdf5 ? withCommonDeps, withMetis ? withCommonDeps, - withZlib ? withP4est, + withZlib ? (withP4est || withPtscotch), withScalapack ? withCommonDeps && mpiSupport, withParmetis ? withFullDeps, # parmetis is unfree withPtscotch ? withCommonDeps && mpiSupport, @@ -64,7 +65,7 @@ assert withP4est -> (mpiSupport && withZlib); # Package parmetis depend on metis and mpi support assert withParmetis -> (withMetis && mpiSupport); -assert withPtscotch -> mpiSupport; +assert withPtscotch -> (mpiSupport && withZlib); assert withScalapack -> mpiSupport; assert (withMumps && mpiSupport) -> withScalapack; assert withHypre -> mpiSupport; @@ -117,6 +118,7 @@ stdenv.mkDerivation (finalAttrs: { python3 gfortran pkg-config + bison ] ++ lib.optional mpiSupport mpi ++ lib.optionals pythonSupport [ From 26d320d7a9695e1af414d1df62569935c03df7ff Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 2 Apr 2025 02:49:14 +0800 Subject: [PATCH 21/22] slepc: 3.22.2 -> 3.23.0 --- pkgs/by-name/sl/slepc/package.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/sl/slepc/package.nix b/pkgs/by-name/sl/slepc/package.nix index 371cd1d15805..42add99600f3 100644 --- a/pkgs/by-name/sl/slepc/package.nix +++ b/pkgs/by-name/sl/slepc/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitLab, - sowing, python3, python3Packages, arpack-mpi, @@ -17,13 +16,13 @@ assert petsc.mpiSupport; assert pythonSupport -> petsc.pythonSupport; stdenv.mkDerivation (finalAttrs: { pname = "slepc"; - version = "3.22.2"; + version = "3.23.0"; src = fetchFromGitLab { owner = "slepc"; repo = "slepc"; tag = "v${finalAttrs.version}"; - hash = "sha256-a5DmsA7NAlhrEaS43TYPk7vtDfhXLEP+5sftu2A9Yt4="; + hash = "sha256-Z9CVZQ/Ezb1S2EkTb9amAPxaN4tiUnKrbvQIc3BnVuU="; }; postPatch = '' @@ -33,11 +32,6 @@ stdenv.mkDerivation (finalAttrs: { "slepc.prefixdir,'${python3.sitePackages}'" patchShebangs lib/slepc/bin - - # Use system bfort - substituteInPlace config/packages/sowing.py \ - --replace-fail "bfort = os.path.join(archdir,'bin','bfort')" \ - "bfort = '${sowing}/bin/bfort'" ''; # Usually this project is being built as part of a `petsc` build or as part of From a9e9363a1101283aa5f7059eb322e3076a96ea91 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 5 Apr 2025 00:49:11 +0000 Subject: [PATCH 22/22] geant4: 11.3.0 -> 11.3.1 --- pkgs/by-name/ge/geant4/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ge/geant4/package.nix b/pkgs/by-name/ge/geant4/package.nix index c2ce7289690b..13bc349112e6 100644 --- a/pkgs/by-name/ge/geant4/package.nix +++ b/pkgs/by-name/ge/geant4/package.nix @@ -38,12 +38,12 @@ let in stdenv.mkDerivation rec { - version = "11.3.0"; + version = "11.3.1"; pname = "geant4"; src = fetchurl { url = "https://cern.ch/geant4-data/releases/geant4-v${version}.tar.gz"; - hash = "sha256-HaQxiz+W+H9NR1WKMtqyabjz/JVnCAOMKOcqGAsO+6Y="; + hash = "sha256-yTyplvbzWqQ/lI/8q6lgNGjfAd7rYvYcM7p2kifDGf4="; }; # Fix broken paths in a .pc