Repository: NixOS/nixpkgs
Pull request #392544: nlopt: fix build, python3Packages.nlopt: init, nlopt: 2.7.1 -> 2.10.0
Author: login: bengsparks
Labels: name: 6.topic: python
description: Python is a high-level, general-purpose programming language.
name: 10.rebuild-linux: 11-100
description: This PR causes between 11 and 100 packages to rebuild on Linux.
name: 10.rebuild-darwin: 11-100
description: This PR causes between 11 and 100 packages to rebuild on Darwin.
name: 12.approvals: 1
description: This PR was reviewed and approved by one person.
Created: 2025-03-23T22:46:10Z | Merged: 2025-04-25T22:46:59Z

## Summary

The `nlopt` package shifted from autoconf to CMake quite some time ago. The first commit updates the package to reflect this.
The second commit makes use of the Python bindings to add a suitable Python module.

The third commit updates nlopt to the latest version v2.10.0, adding support for building Java bindings on request, documentation by default, and disabling Luksan solvers to allow for an MIT-licensed release.
It adds three patches (two doc-related, one testing related) to ensure everything is output as expected, including fixing an off-by-one error in a CMakeLists.txt.

The last two commits reintroduce automatic updates and add support for separating debug info.

The final result is a new healthy package, and two more packages now building correctly, namely
`haskellPackages.hmatrix-nlopt` and `haskellPackages.nlopt-haskell`.


### Changelog:

https://github.com/stevengj/nlopt/releases/tag/v2.8.0
https://github.com/stevengj/nlopt/releases/tag/v2.9.0
https://github.com/stevengj/nlopt/releases/tag/v2.9.1
https://github.com/stevengj/nlopt/releases/tag/v2.10.0

### Checks done for v2.7.1
<details>
<summary>Successfully build and test nlopt</summary>

```console
$ nix-build -A nlopt
100% tests passed, 0 tests failed out of 57
```
</details>

<details>
<summary>Successfully build and test Python bindings</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withPython = true; })"
58/58 Test #58: test_python ......................   Passed    0.28 sec
100% tests passed, 0 tests failed out of 58
```
</details>

<details>
<summary>Successfully build and test Octave bindings</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withOctave = true; })"
58/58 Test #58: test_octave ......................   Passed    1.96 sec
100% tests passed, 0 tests failed out of 58
```
</details>

<details>
<summary>Successfully build and test both bindings at the same time</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withOctave = true; withPython = true; })"
58/59 Test #58: test_python ......................   Passed    0.44 sec
59/59 Test #59: test_octave ......................   Passed    0.47 sec
100% tests passed, 0 tests failed out of 59
```
</details>




### Checks done for v2.10.0:
<details>
<summary>Successfully build and test nlopt</summary>

```console
$ nix-build -A nlopt
100% tests passed, 0 tests failed out of 77
```
</details>

<details>
<summary>Successfully build and test Python bindings</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withPython = true; })"
78/82 Test #78: test_python24 ....................   Passed    0.50 sec
79/82 Test #81: test_python40 ....................   Passed    0.45 sec
80/82 Test #80: test_python31 ....................   Passed    0.51 sec
81/82 Test #79: test_python25 ....................   Passed    0.54 sec
82/82 Test #82: test_memoize .....................   Passed    0.99 sec
100% tests passed, 0 tests failed out of 82
```

</details>

<details>
<summary>Successfully build and test Octave bindings</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withOctave = true; })"
78/78 Test #78: test_octave ......................   Passed    0.55 sec
100% tests passed, 0 tests failed out of 78
```
</details>

<details>
<summary>Successfully build and test Java bindings</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withJava = true; })"
78/81 Test #81: test_java40 ......................   Passed    0.20 sec
79/81 Test #78: test_java24 ......................   Passed    0.24 sec
80/81 Test #79: test_java25 ......................   Passed    0.27 sec
81/81 Test #80: test_java31 ......................   Passed    0.27 sec
100% tests passed, 0 tests failed out of 81
```
</details>

<details>
<summary>Successfully build and test nlopt without Luksan solvers</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withoutLuksanSolvers = true; })"
100% tests passed, 0 tests failed out of 61

The following tests did not run:
         42 - testopt_algo11_obj0 (Disabled)
         43 - testopt_algo11_obj1 (Disabled)
         44 - testopt_algo12_obj0 (Disabled)
         45 - testopt_algo12_obj1 (Disabled)
         46 - testopt_algo13_obj0 (Disabled)
         47 - testopt_algo13_obj1 (Disabled)
         48 - testopt_algo14_obj0 (Disabled)
         49 - testopt_algo14_obj1 (Disabled)
         50 - testopt_algo15_obj0 (Disabled)
         51 - testopt_algo15_obj1 (Disabled)
         52 - testopt_algo16_obj0 (Disabled)
         53 - testopt_algo16_obj1 (Disabled)
         54 - testopt_algo17_obj0 (Disabled)
         55 - testopt_algo17_obj1 (Disabled)
         56 - testopt_algo18_obj0 (Disabled)
         57 - testopt_algo18_obj1 (Disabled)
```
</details>

<details>
<summary>Successfully build and test all bindings at the same time while disabling Luksan solvers</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { withoutLuksanSolvers = true; withPython = true; withJava = true; withOctave = true; })"`

80/87 Test #85: test_java31 ......................   Passed    0.31 sec
81/87 Test #86: test_java40 ......................   Passed    0.19 sec
82/87 Test #78: test_python24 ....................   Passed    0.61 sec
83/87 Test #79: test_python25 ....................   Passed    0.62 sec
84/87 Test #81: test_python40 ....................   Passed    0.54 sec
85/87 Test #80: test_python31 ....................   Passed    0.62 sec
86/87 Test #87: test_octave ......................   Passed    0.55 sec
87/87 Test #82: test_memoize .....................   Passed    1.29 sec
100% tests passed, 0 tests failed out of 71

The following tests did not run:
         42 - testopt_algo11_obj0 (Disabled)
         43 - testopt_algo11_obj1 (Disabled)
         44 - testopt_algo12_obj0 (Disabled)
         45 - testopt_algo12_obj1 (Disabled)
         46 - testopt_algo13_obj0 (Disabled)
         47 - testopt_algo13_obj1 (Disabled)
         48 - testopt_algo14_obj0 (Disabled)
         49 - testopt_algo14_obj1 (Disabled)
         50 - testopt_algo15_obj0 (Disabled)
         51 - testopt_algo15_obj1 (Disabled)
         52 - testopt_algo16_obj0 (Disabled)
         53 - testopt_algo16_obj1 (Disabled)
         54 - testopt_algo17_obj0 (Disabled)
         55 - testopt_algo17_obj1 (Disabled)
         56 - testopt_algo18_obj0 (Disabled)
         57 - testopt_algo18_obj1 (Disabled)
```

</details>

### Checks done for both v2.7.1 and v2.10.0:
<details>
<summary>Skip checks</summary>

```console
$ nix-build -E "with import <nixpkgs> {}; (callPackage pkgs/development/libraries/nlopt/default.nix { }).overrideAttrs { doCheck = false; }"
```
</details>

<details>
<summary>Usage of dynamic and statically linked nlopt (continues) to function</summary>

```console
$ nixpkgs-review pr 392544
```
</details>

## Things done

- Built on platform(s)
  - [x] x86_64-linux
  - [x] aarch64-linux
  - [ ] x86_64-darwin
  - [x] aarch64-darwin
- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
  - [ ] `sandbox = relaxed`
  - [ ] `sandbox = true`
- [x] Tested, as applicable:
  - [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
  - and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
  - or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
  - made sure NixOS tests are [linked](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#linking-nixos-module-tests-to-a-package) to the relevant packages
- [x] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [x] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [25.05 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2505.section.md) (or backporting [24.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) and [25.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2505.section.md) Release notes)
  - [ ] (Package updates) Added a release notes entry if the change is major or breaking
  - [ ] (Module updates) Added a release notes entry if the change is significant
  - [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).

<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!

List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->

---

Add a :+1: [reaction] to [pull requests you find important].

[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc



Diff:
diff --git a/pkgs/development/libraries/nlopt/default.nix b/pkgs/development/libraries/nlopt/default.nix
index 1e1f5f01c3821..51386f659748a 100644
--- a/pkgs/development/libraries/nlopt/default.nix
+++ b/pkgs/development/libraries/nlopt/default.nix
@@ -2,50 +2,149 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
-}:
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 
-stdenv.mkDerivation rec {
+  # v2.8.0 introduced a regression where testing on Linux platforms fails with a buffer overflow
+  # when compiled with -D_FORTIFY_SOURCE=3.
+  # This was deemed to be a compiler false positive by the library's author in https://github.com/stevengj/nlopt/issues/563.
+  # Building with `clangStdenv` prevents this from occurring.
+  clangStdenv,
+}:
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+clangStdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = "nlopt";
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
+  outputs = [
+    "out"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
+    ]
+    ## Building the java bindings requires SWIG, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
 
-  configureFlags =
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  cmakeFlags =
     [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+      (lib.cmakeBool "BUILD_SHARED_LIBS" (!withStatic))
+      (lib.cmakeBool "NLOPT_CXX" true)
+      (lib.cmakeBool "NLOPT_PYTHON" withPython)
+      (lib.cmakeBool "NLOPT_OCTAVE" withOctave)
+      (lib.cmakeBool "NLOPT_JAVA" withJava)
+      (lib.cmakeBool "NLOPT_SWIG" (withPython || withJava))
+      (lib.cmakeBool "NLOPT_FORTRAN" false)
+      (lib.cmakeBool "NLOPT_MATLAB" false)
+      (lib.cmakeBool "NLOPT_GUILE" false)
+      (lib.cmakeBool "NLOPT_LUKSAN" (!withoutLuksanSolvers))
+      (lib.cmakeBool "NLOPT_TESTS" finalAttrs.doCheck)
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ++ lib.optional withPython (
+      lib.cmakeFeature "Python_EXECUTABLE" "${buildPythonBindingsEnv.interpreter}"
+    );
+
+  postBuild = ''
+    ${buildDocsEnv.interpreter} -m mkdocs build \
+      --config-file ../mkdocs.yml \
+      --site-dir $doc \
+      --no-directory-urls
+  '';
+
+  doCheck = true;
 
   postFixup = ''
-    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
+    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace-fail \
       'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
   '';
 
+  passthru.updateScript = nix-update-script { };
+
   meta = {
     homepage = "https://nlopt.readthedocs.io/en/latest/";
+    changelog = "https://github.com/stevengj/nlopt/releases/tag/v${finalAttrs.version}";
     description = "Free open-source library for nonlinear optimization";
-    license = lib.licenses.lgpl21Plus;
-    hydraPlatforms = lib.platforms.linux;
+    license = if withoutLuksanSolvers then lib.licenses.mit else lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.bengsparks ];
   };
-
-}
+})
diff --git a/pkgs/development/python-modules/nlopt/default.nix b/pkgs/development/python-modules/nlopt/default.nix
new file mode 100644
index 0000000000000..55bfc2d2884cb
--- /dev/null
+++ b/pkgs/development/python-modules/nlopt/default.nix
@@ -0,0 +1,5 @@
+{
+  toPythonModule,
+  pkgs,
+}:
+toPythonModule (pkgs.nlopt.override { withPython = true; })
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0a2161727e006..bdcbd816ac724 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4298,7 +4298,7 @@ with pkgs;
 
   nifskope = libsForQt5.callPackage ../tools/graphics/nifskope { };
 
-  nlopt = callPackage ../development/libraries/nlopt { octave = null; };
+  nlopt = callPackage ../development/libraries/nlopt { };
 
   notation = callPackage ../by-name/no/notation/package.nix {
     buildGoModule = buildGo123Module;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9abac7174fad6..cce6ef0862208 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -10547,6 +10547,8 @@ self: super: with self; {
 
   nkdfu = callPackage ../development/python-modules/nkdfu { };
 
+  nlopt = callPackage ../development/python-modules/nlopt { };
+
   nlpcloud = callPackage ../development/python-modules/nlpcloud { };
 
   nlpo3 = callPackage ../development/python-modules/nlpo3 { };


Reviews:
user: login: LordGrimmauld
body: I have not yet built the package or checked functionality, but some of these things can be reviewed with online tools alone. I will do a more thorough review once i have the time.
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T20:19:34Z
user: login: bengsparks
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T20:26:00Z
user: login: LordGrimmauld
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T20:43:12Z
user: login: bengsparks
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T22:01:48Z
user: login: LordGrimmauld
body: Lots of improvements, but some of your cmake flags seem to have been lost. Was this intentional?
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T12:40:21Z
user: login: bengsparks
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T16:06:12Z
user: login: LordGrimmauld
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-20T19:20:50Z
user: login: niklaskorz
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-25T21:51:28Z
user: login: bengsparks
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-25T22:44:08Z
user: login: niklaskorz
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-25T22:46:32Z

Review comments:
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+    "-DBUILD_SHARED_LIBS=${if !withStatic then "ON" else "OFF"}"
+    "-DNLOPT_CXX=ON"
+    "-DNLOPT_PYTHON=${if withPython then "ON" else "OFF"}"
+    "-DNLOPT_OCTAVE=${if withOctave then "ON" else "OFF"}"
+    "-DNLOPT_JAVA=${if withJava then "ON" else "OFF"}"
+    "-DNLOPT_SWIG=${if withPython || withJava then "ON" else "OFF"}"
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: nit:
```suggestion
     (lib.cmakeBool "NLOPT_SWIG" (withPython || withJava))
```
for the other bools too
created_at: 2025-04-07T20:09:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: nit:
```suggestion
    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    (lib.cmakeFeature "CMAKE_BUILD_TYPE" "RelWithDebInfo")
```
For the other non-bool flags too
created_at: 2025-04-07T20:11:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+    "-DBUILD_SHARED_LIBS=${if !withStatic then "ON" else "OFF"}"
+    "-DNLOPT_CXX=ON"
+    "-DNLOPT_PYTHON=${if withPython then "ON" else "OFF"}"
+    "-DNLOPT_OCTAVE=${if withOctave then "ON" else "OFF"}"
+    "-DNLOPT_JAVA=${if withJava then "ON" else "OFF"}"
+    "-DNLOPT_SWIG=${if withPython || withJava then "ON" else "OFF"}"
+    "-DNLOPT_FORTRAN=OFF"
+    "-DNLOPT_MATLAB=OFF"
+    "-DNLOPT_GUILE=OFF"
+    "-DNLOPT_LUKSAN=${if !withoutLuksanSolvers then "ON" else "OFF"}"
+    "-DNLOPT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
+  ] ++ lib.optional withPython "-DPython_EXECUTABLE=${buildPythonBindingsEnv.interpreter}";
+
+  postBuild = ''
+    ${buildDocsEnv.interpreter} -m mkdocs build \
+      --config-file ../mkdocs.yml \
+      --site-dir $doc \
+      --no-directory-urls
+  '';
+
+  doCheck = true;
 
   postFixup = ''
-    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
+    substituteInPlace $dev/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace-fail \
       'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
   '';
 
+  passthru.updateScript = gitUpdater {
+    # Releases are prefixed with v
+    rev-prefix = "v";
+    # Prefix for versions pre v2.5.0
+    ignoredVersions = "^nlopt-.*$";
+  };
+
   meta = {
     homepage = "https://nlopt.readthedocs.io/en/latest/";
+    changelog = "https://github.com/stevengj/nlopt/releases/tag/v${finalAttrs.version}";
     description = "Free open-source library for nonlinear optimization";
-    license = lib.licenses.lgpl21Plus;
-    hydraPlatforms = lib.platforms.linux;
+    license = if withoutLuksanSolvers then lib.licenses.mit else lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.bengsparks ];
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: Nice! More maintainers = more good :)
created_at: 2025-04-07T20:12:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: ```suggestion
    repo = "nlopt";
```
Making src repo dependent on `pname` is discouraged, as this can result in dangerous behavior with overrides.
created_at: 2025-04-07T20:13:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+    "-DBUILD_SHARED_LIBS=${if !withStatic then "ON" else "OFF"}"
+    "-DNLOPT_CXX=ON"
+    "-DNLOPT_PYTHON=${if withPython then "ON" else "OFF"}"
+    "-DNLOPT_OCTAVE=${if withOctave then "ON" else "OFF"}"
+    "-DNLOPT_JAVA=${if withJava then "ON" else "OFF"}"
+    "-DNLOPT_SWIG=${if withPython || withJava then "ON" else "OFF"}"
+    "-DNLOPT_FORTRAN=OFF"
+    "-DNLOPT_MATLAB=OFF"
+    "-DNLOPT_GUILE=OFF"
+    "-DNLOPT_LUKSAN=${if !withoutLuksanSolvers then "ON" else "OFF"}"
+    "-DNLOPT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
+  ] ++ lib.optional withPython "-DPython_EXECUTABLE=${buildPythonBindingsEnv.interpreter}";
+
+  postBuild = ''
+    ${buildDocsEnv.interpreter} -m mkdocs build \
+      --config-file ../mkdocs.yml \
+      --site-dir $doc \
+      --no-directory-urls
+  '';
+
+  doCheck = true;
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: nice!
created_at: 2025-04-07T20:15:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
+    ]
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+    "-DBUILD_SHARED_LIBS=${if !withStatic then "ON" else "OFF"}"
+    "-DNLOPT_CXX=ON"
+    "-DNLOPT_PYTHON=${if withPython then "ON" else "OFF"}"
+    "-DNLOPT_OCTAVE=${if withOctave then "ON" else "OFF"}"
+    "-DNLOPT_JAVA=${if withJava then "ON" else "OFF"}"
+    "-DNLOPT_SWIG=${if withPython || withJava then "ON" else "OFF"}"
+    "-DNLOPT_FORTRAN=OFF"
+    "-DNLOPT_MATLAB=OFF"
+    "-DNLOPT_GUILE=OFF"
+    "-DNLOPT_LUKSAN=${if !withoutLuksanSolvers then "ON" else "OFF"}"
+    "-DNLOPT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
+  ] ++ lib.optional withPython "-DPython_EXECUTABLE=${buildPythonBindingsEnv.interpreter}";
+
+  postBuild = ''
+    ${buildDocsEnv.interpreter} -m mkdocs build \
+      --config-file ../mkdocs.yml \
+      --site-dir $doc \
+      --no-directory-urls
+  '';
+
+  doCheck = true;
 
   postFixup = ''
-    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
+    substituteInPlace $dev/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace-fail \
       'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
   '';
 
+  passthru.updateScript = gitUpdater {
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: ```suggestion
  passthru.updateScript = nix-update-script {
```
My understanding is `nix-update-script` is preferred, though i do not exactly know why. Unwritten style guides and all, i hate it.
created_at: 2025-04-07T20:16:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: patches in nixpkgs are the license of the thing they are patching. Luksan has a different license than the rest of the project. Maybe this patch should be conditional on luksan stuff?
created_at: 2025-04-07T20:17:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
path: pkgs/development/libraries/nlopt/default.nix
user: login: bengsparks
body: What if it's not luksan code being patched, but a CMakeLists for testing?
created_at: 2025-04-07T20:25:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: not sure, sorry - probably depends on how upstream defines their split licensing?
created_at: 2025-04-07T20:43:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
path: pkgs/development/libraries/nlopt/default.nix
user: login: bengsparks
body: I imagine the patch is unaffected by licensing, as we do not distribute the tests or the CMakeLists, and the patch does not affect the inclusion of luksan code in the built library. Can you ping someone who knows more?
created_at: 2025-04-07T22:01:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,141 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = "nlopt";
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
+    ]
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: What happened to `"-DCMAKE_BUILD_TYPE=RelWithDebInfo"` ?
What happened to `NLOPT_JAVA` ?
created_at: 2025-04-08T12:38:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,141 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = "nlopt";
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
+    ]
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
+    (lib.cmakeBool "BUILD_SHARED_LIBS" (!withStatic))
+    (lib.cmakeBool "NLOPT_CXX" true)
+    (lib.cmakeBool "NLOPT_PYTHON" withPython)
+    (lib.cmakeBool "NLOPT_OCTAVE" withOctave)
+    (lib.cmakeBool "NLOPT_SWIG" (withPython || withJava))
+    (lib.cmakeBool "NLOPT_FORTRAN" false)
+    (lib.cmakeBool "NLOPT_MATLAB" false)
+    (lib.cmakeBool "NLOPT_GUILE" false)
+    (lib.cmakeBool "NLOPT_LUKSAN" (!withoutLuksanSolvers))
+    (lib.cmakeBool "NLOPT_TESTS" finalAttrs.doCheck)
+  ] ++ lib.optional withPython "-DPython_EXECUTABLE=${buildPythonBindingsEnv.interpreter}";
path: pkgs/development/libraries/nlopt/default.nix
user: login: LordGrimmauld
body: nit: this could be `lib.cmakeFeature`
created_at: 2025-04-08T12:39:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,141 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = "nlopt";
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
+      name = "fix-nondisabled-luksan-algorithm";
+      url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
+      hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace nlopt.pc.in \
+      --replace-fail 'libdir=''${exec_prefix}/@NLOPT_INSTALL_LIBDIR@' 'libdir=@NLOPT_INSTALL_LIBDIR@'
+  '';
+
+  nativeBuildInputs =
+    [ cmake ]
+    ## Building the python bindings requires SWIG, and numpy in addition to the CXX routines.
+    ## The tests also make use of the same interpreter to test the bindings.
+    ++ lib.optionals withPython [
+      swig
+      buildPythonBindingsEnv
+    ]
+    ## Building the java bindings requires Swig, C++, JNI and Java
+    ++ lib.optionals withJava [
+      swig
+      jdk
     ]
-    ++ lib.optionals (octave != null) [
-      "--with-octave"
-      "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
-      "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
-    ];
+    ## Building octave bindings requires `mkoctfile` to be installed.
+    ++ lib.optional withOctave octave;
+
+  # Python bindings depend on numpy at import time.
+  propagatedBuildInputs = lib.optional withPython python3Packages.numpy;
+
+  separateDebugInfo = true;
+
+  cmakeFlags = [
path: pkgs/development/libraries/nlopt/default.nix
user: login: bengsparks
body: o.o
created_at: 2025-04-08T16:06:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,50 +2,149 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
-}:
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 
-stdenv.mkDerivation rec {
+  # v2.8.0 introduced a regression where testing on Linux platforms fails with a buffer overflow
+  # when compiled with -D_FORTIFY_SOURCE=3.
+  # This was deemed to be a compiler false positive by the library's author in https://github.com/stevengj/nlopt/issues/563.
path: pkgs/development/libraries/nlopt/default.nix
user: login: niklaskorz
body: The linked issue references a [fix included in 2.10.0](https://github.com/stevengj/nlopt/commit/487b87fc428c7c9c32c1cf1150b2dcc4e4d446f5), so is this still needed?
created_at: 2025-04-25T21:47:56Z
author_association: MEMBER
diff_hunk: @@ -2,50 +2,148 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
+  gitUpdater,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 }:
-
-stdenv.mkDerivation rec {
+let
+  buildPythonBindingsEnv = python3.withPackages (p: [ p.numpy ]);
+  buildDocsEnv = python3.withPackages (p: [
+    p.mkdocs
+    p.python-markdown-math
+  ]);
+in
+stdenv.mkDerivation (finalAttrs: {
   pname = "nlopt";
-  version = "2.7.1";
+  version = "2.10.0";
 
   src = fetchFromGitHub {
     owner = "stevengj";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+    repo = finalAttrs.pname;
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
   };
 
-  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
-  buildInputs = [ octave ];
-
-  configureFlags =
-    [
-      "--with-cxx"
-      "--enable-shared"
-      "--with-pic"
-      "--without-guile"
-      "--without-python"
-      "--without-matlab"
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "missing-java-reference-mkdocs";
+      url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
+      hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
+    })
+
+    # 26-03-2025: The docs pages still list v2.7.1 as the newest version.
+    # 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
+    # 26-03-2025: part of a release.
+    (fetchpatch {
+      name = "update-index-md";
+      url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
+      hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
+    })
+
+    # 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
+    # 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
+    # 26-03-2025: which in turn causes the test suite to fail.
+    # 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
+    (fetchpatch {
path: pkgs/development/libraries/nlopt/default.nix
user: login: niklaskorz
body: The license states only the files in the `luksan/` directory are affected, while the CMakeLists.txt of the patch is in the `test/` directory, so this looks perfectly fine
created_at: 2025-04-25T21:50:31Z
author_association: MEMBER
diff_hunk: @@ -2,50 +2,149 @@
   lib,
   stdenv,
   fetchFromGitHub,
+  fetchpatch,
   cmake,
-  octave ? null,
-  libiconv,
-}:
+  nix-update-script,
+  # Optionally build Python bindings
+  withPython ? false,
+  python3,
+  python3Packages,
+  # Optionally build Octave bindings
+  withOctave ? false,
+  octave,
+  # Optionally build Java bindings
+  withJava ? false,
+  jdk,
+  # Required for building the Python and Java bindings
+  swig,
+  # Optionally exclude Luksan solvers to allow licensing under MIT
+  withoutLuksanSolvers ? false,
+  # Build static on-demand
+  withStatic ? stdenv.hostPlatform.isStatic,
 
-stdenv.mkDerivation rec {
+  # v2.8.0 introduced a regression where testing on Linux platforms fails with a buffer overflow
+  # when compiled with -D_FORTIFY_SOURCE=3.
+  # This was deemed to be a compiler false positive by the library's author in https://github.com/stevengj/nlopt/issues/563.
path: pkgs/development/libraries/nlopt/default.nix
user: login: bengsparks
body: The regression first emerged when compiling 2.10.0 for nixpkgs, so it is still needed. At the bottom, there is someone who apparently could reproduce it, so it seems we're not alone.
created_at: 2025-04-25T22:44:08Z
author_association: CONTRIBUTOR

PR comments:
user: login: bengsparks
created_at: 2025-03-26T15:54:47Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `aarch64-darwin`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>stellarium</li>
  </ul>
</details>
<details>
  <summary>:x: 11 packages failed to build:</summary>
  <ul>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>openturns</li>
    <li>python312Packages.openturns</li>
    <li>python313Packages.openturns</li>
    <li>sageWithDoc</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 14 packages built:</summary>
  <ul>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.dev</li>
    <li>pagmo2</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
  </ul>
</details>

author_association: CONTRIBUTOR
user: login: bengsparks
created_at: 2025-03-26T16:02:30Z
body: The above nixpkgs-review for nlopt v2.7.1 matches expectations:
- `haskellPackages.hmatrix-nlopt` (and thereby `haskellPackages.hmatrix-nlopt.doc`, `haskellPackages.nlopt-haskell(.doc)`): [logs](https://cache.nixos.org/log/687niaz5s306yqkpmmrznd5bdrxwplrf-nlopt-haskell-0.1.3.0.drv)
- `openturns` (and thereby `python{312, 313}Packages.openturns`): [logs](https://cache.nixos.org/log/rgghbjv2sah3m09q1z4wns1nw7292819-hmat-oss-1.10.0.drv)
- `sageWithDoc`: [logs](https://cache.nixos.org/log/6s555yvka3i1xjhxzs5p97qwakgfqari-sagedoc-10.5.drv)
- `shogun` (and thereby `shogun.{dev, doc}`): [logs](https://cache.nixos.org/log/xrkmqk6xvwav4mr0y65ypdycl6i2i85s-shogun-6.1.4.drv)
author_association: CONTRIBUTOR
user: login: bengsparks
created_at: 2025-03-26T23:14:44Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `aarch64-darwin`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>stellarium</li>
  </ul>
</details>
<details>
  <summary>:x: 7 packages failed to build:</summary>
  <ul>
    <li>openturns</li>
    <li>python312Packages.openturns</li>
    <li>python313Packages.openturns</li>
    <li>sageWithDoc</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 20 packages built:</summary>
  <ul>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.dev</li>
    <li>nlopt.doc</li>
    <li>pagmo2</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
  </ul>
</details>

author_association: CONTRIBUTOR
user: login: grimmauld-bot
created_at: 2025-04-08T17:32:40Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `aarch64-linux`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>cura</li>
  </ul>
</details>
<details>
  <summary>:x: 45 packages failed to build:</summary>
  <ul>
    <li>bambu-studio</li>
    <li>bambu-studio.debug</li>
    <li>cantor (libsForQt5.cantor, plasma5Packages.cantor)</li>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>jasp-desktop</li>
    <li>labplot</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.debug</li>
    <li>nlopt.dev</li>
    <li>nlopt.doc</li>
    <li>openturns</li>
    <li>orca-slicer</li>
    <li>orca-slicer.debug</li>
    <li>pagmo2</li>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.debug (python313Packages.nlopt.debug)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.openturns</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.pynest2d</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.openturns</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.pynest2d</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
    <li>sageWithDoc</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
    <li>stellarium</li>
    <li>super-slicer (super-slicer-latest)</li>
    <li>super-slicer-beta</li>
    <li>super-slicer-beta.debug</li>
    <li>super-slicer.debug (super-slicer-latest.debug)</li>
  </ul>
</details>

author_association: NONE
user: login: LordGrimmauld
created_at: 2025-04-08T17:34:11Z
body: something is very wrong with the build now...
author_association: CONTRIBUTOR
user: login: bengsparks
created_at: 2025-04-08T18:02:10Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544 --skip-package-regex (python31(2|3)Packages\.)?openturns --skip-package-regex shogun --skip-package-regex sageWithDoc --skip-package-regex sage`

---
### `aarch64-darwin`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>stellarium</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 19 packages built:</summary>
  <ul>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.dev</li>
    <li>nlopt.doc</li>
    <li>pagmo2</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
  </ul>
</details>

author_association: CONTRIBUTOR
user: login: LordGrimmauld
created_at: 2025-04-08T18:07:19Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `x86_64-linux`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>cura</li>
  </ul>
</details>
<details>
  <summary>:x: 45 packages failed to build:</summary>
  <ul>
    <li>bambu-studio</li>
    <li>bambu-studio.debug</li>
    <li>cantor (libsForQt5.cantor, plasma5Packages.cantor)</li>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>jasp-desktop</li>
    <li>labplot</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.debug</li>
    <li>nlopt.dev</li>
    <li>nlopt.doc</li>
    <li>openturns</li>
    <li>orca-slicer</li>
    <li>orca-slicer.debug</li>
    <li>pagmo2</li>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.debug (python313Packages.nlopt.debug)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.openturns</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.pynest2d</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.openturns</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.pynest2d</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
    <li>sageWithDoc</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
    <li>stellarium</li>
    <li>super-slicer (super-slicer-latest)</li>
    <li>super-slicer-beta</li>
    <li>super-slicer-beta.debug</li>
    <li>super-slicer.debug (super-slicer-latest.debug)</li>
  </ul>
</details>

author_association: CONTRIBUTOR
user: login: bengsparks
created_at: 2025-04-08T18:09:31Z
body: ```
> 71/77 Test #75: testopt_algo27_obj1 ..............Subprocess aborted***Exception:   0.12 sec
> *** buffer overflow detected ***: terminated
 ```
 welp, time to file an issue upstream.
author_association: CONTRIBUTOR
user: login: grimmauld-bot
created_at: 2025-04-12T22:03:57Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `aarch64-linux`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>cura</li>
  </ul>
</details>
<details>
  <summary>:x: 17 packages failed to build:</summary>
  <ul>
    <li>bambu-studio</li>
    <li>bambu-studio.debug</li>
    <li>cantor (libsForQt5.cantor, plasma5Packages.cantor)</li>
    <li>labplot</li>
    <li>orca-slicer</li>
    <li>orca-slicer.debug</li>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug</li>
    <li>python312Packages.pynest2d</li>
    <li>python313Packages.pynest2d</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
    <li>super-slicer (super-slicer-latest)</li>
    <li>super-slicer-beta</li>
    <li>super-slicer-beta.debug</li>
    <li>super-slicer.debug (super-slicer-latest.debug)</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 31 packages built:</summary>
  <ul>
    <li>dartsim</li>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>jasp-desktop</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.debug</li>
    <li>nlopt.dev</li>
    <li>nlopt.doc</li>
    <li>openturns</li>
    <li>pagmo2</li>
    <li>python312Packages.dartsim</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.debug (python313Packages.nlopt.debug)</li>
    <li>python312Packages.nlopt.dev (python313Packages.nlopt.dev)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.openturns</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.dartsim</li>
    <li>python313Packages.openturns</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
    <li>sageWithDoc</li>
    <li>stellarium</li>
  </ul>
</details>

author_association: NONE
user: login: grimmauld-bot
created_at: 2025-04-13T07:15:55Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `aarch64-linux`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>cura</li>
  </ul>
</details>
<details>
  <summary>:x: 12 packages failed to build:</summary>
  <ul>
    <li>bambu-studio</li>
    <li>bambu-studio.debug</li>
    <li>cantor (libsForQt5.cantor, plasma5Packages.cantor)</li>
    <li>jasp-desktop</li>
    <li>labplot</li>
    <li>orca-slicer</li>
    <li>orca-slicer.debug</li>
    <li>python312Packages.pynest2d</li>
    <li>python313Packages.pynest2d</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 32 packages built:</summary>
  <ul>
    <li>dartsim</li>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.doc</li>
    <li>openturns</li>
    <li>pagmo2</li>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug</li>
    <li>python312Packages.dartsim</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.openturns</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.dartsim</li>
    <li>python313Packages.openturns</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>sage</li>
    <li>sageWithDoc</li>
    <li>stellarium</li>
    <li>super-slicer (super-slicer-latest)</li>
    <li>super-slicer-beta</li>
    <li>super-slicer-beta.debug</li>
    <li>super-slicer.debug (super-slicer-latest.debug)</li>
  </ul>
</details>

author_association: NONE
user: login: grimmauld-bot
created_at: 2025-04-13T07:53:53Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544`

---
### `x86_64-linux`
<details>
  <summary>:fast_forward: 1 package marked as broken and skipped:</summary>
  <ul>
    <li>cura</li>
  </ul>
</details>
<details>
  <summary>:x: 7 packages failed to build:</summary>
  <ul>
    <li>python312Packages.pynest2d</li>
    <li>python313Packages.pynest2d</li>
    <li>sage</li>
    <li>sageWithDoc</li>
    <li>shogun</li>
    <li>shogun.dev</li>
    <li>shogun.doc</li>
  </ul>
</details>
<details>
  <summary>:white_check_mark: 37 packages built:</summary>
  <ul>
    <li>bambu-studio</li>
    <li>bambu-studio.debug</li>
    <li>cantor (libsForQt5.cantor, plasma5Packages.cantor)</li>
    <li>dartsim</li>
    <li>haskellPackages.hmatrix-nlopt</li>
    <li>haskellPackages.hmatrix-nlopt.doc</li>
    <li>haskellPackages.nlopt-haskell</li>
    <li>haskellPackages.nlopt-haskell.doc</li>
    <li>jasp-desktop</li>
    <li>labplot</li>
    <li>libnest2d</li>
    <li>nlopt</li>
    <li>nlopt.doc</li>
    <li>openturns</li>
    <li>orca-slicer</li>
    <li>orca-slicer.debug</li>
    <li>pagmo2</li>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug</li>
    <li>python312Packages.dartsim</li>
    <li>python312Packages.nlopt (python313Packages.nlopt)</li>
    <li>python312Packages.nlopt.doc (python313Packages.nlopt.doc)</li>
    <li>python312Packages.openturns</li>
    <li>python312Packages.pygmo</li>
    <li>python312Packages.rpy2</li>
    <li>python312Packages.rpy2.dist</li>
    <li>python313Packages.dartsim</li>
    <li>python313Packages.openturns</li>
    <li>python313Packages.pygmo</li>
    <li>python313Packages.rpy2</li>
    <li>python313Packages.rpy2.dist</li>
    <li>resorter</li>
    <li>stellarium</li>
    <li>super-slicer (super-slicer-latest)</li>
    <li>super-slicer-beta</li>
    <li>super-slicer-beta.debug</li>
    <li>super-slicer.debug (super-slicer-latest.debug)</li>
  </ul>
</details>

author_association: NONE
user: login: bengsparks
created_at: 2025-04-20T19:18:39Z
body: ## `nixpkgs-review` result

Generated using [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review).

Command: `nixpkgs-review pr 392544 --package super-slicer --package prusa-slicer`

---
### `aarch64-linux`
<details>
  <summary>:white_check_mark: 4 packages built:</summary>
  <ul>
    <li>prusa-slicer</li>
    <li>prusa-slicer.debug (prusa-slicer.debug.debug)</li>
    <li>super-slicer</li>
    <li>super-slicer.debug (super-slicer.debug.debug)</li>
  </ul>
</details>

author_association: CONTRIBUTOR