Skip to content

Commit 63c1544

Browse files
[Backport release-25.11] nlopt: 2.10.0 -> 2.10.1 (#491435)
2 parents 6fe88b3 + 181c8fd commit 63c1544

1 file changed

Lines changed: 8 additions & 37 deletions

File tree

pkgs/by-name/nl/nlopt/package.nix

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
swig,
2020
# Optionally exclude Luksan solvers to allow licensing under MIT
2121
withoutLuksanSolvers ? false,
22+
23+
# Builds docs on-demand
24+
withDocs ? false,
25+
2226
# Build static on-demand
2327
withStatic ? stdenv.hostPlatform.isStatic,
2428

@@ -37,49 +41,16 @@ let
3741
in
3842
clangStdenv.mkDerivation (finalAttrs: {
3943
pname = "nlopt";
40-
version = "2.10.0";
44+
version = "2.10.1";
4145

4246
src = fetchFromGitHub {
4347
owner = "stevengj";
4448
repo = "nlopt";
4549
tag = "v${finalAttrs.version}";
46-
hash = "sha256-mZRmhXrApxfiJedk+L/poIP2DR/BkV04c5fiwPGAyjI=";
50+
hash = "sha256-i+Cd2VLMbI4PUSXennR8jgF+/ZkzKX9WkVTPtayr8vs=";
4751
};
4852

49-
outputs = [
50-
"out"
51-
"doc"
52-
];
53-
54-
patches = [
55-
# 26-03-2025: `mkdocs.yml` is missing a link for the subpage related to the Java bindings.
56-
# 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
57-
# 26-03-2025: part of a release.
58-
(fetchpatch {
59-
name = "missing-java-reference-mkdocs";
60-
url = "https://github.com/stevengj/nlopt/commit/7e34f1a6fe82ed27daa6111d83c4d5629555454b.patch";
61-
hash = "sha256-XivfZtgIGLyTtU+Zo2jSQAx2mVdGLJ8PD7VSSvGR/5Q=";
62-
})
63-
64-
# 26-03-2025: The docs pages still list v2.7.1 as the newest version.
65-
# 26-03-2025: This commit was merged after v2.10.0 was released, and has not been made
66-
# 26-03-2025: part of a release.
67-
(fetchpatch {
68-
name = "update-index-md";
69-
url = "https://github.com/stevengj/nlopt/commit/2c4147832eff7ea15d0536c82351a9e169f85e43.patch";
70-
hash = "sha256-BXcbNUyu20f3N146v6v9cpjSj5CwuDtesp6lAqOK2KY=";
71-
})
72-
73-
# 26-03-2025: There is an off-by-one error in the test/CMakeLists.txt
74-
# 26-03-2025: that causes the tests to attempt to run disabled Luksan solver code,
75-
# 26-03-2025: which in turn causes the test suite to fail.
76-
# 26-03-2025: See https://github.com/stevengj/nlopt/pull/605
77-
(fetchpatch {
78-
name = "fix-nondisabled-luksan-algorithm";
79-
url = "https://github.com/stevengj/nlopt/commit/7817ec19f21be6877a4b79777fc5315a52c6850b.patch";
80-
hash = "sha256-KgdAMSYKOQuraun4HNr9GOx48yjyeQk6W3IgWRA44oo=";
81-
})
82-
];
53+
outputs = [ "out" ] ++ lib.optional withDocs "doc";
8354

8455
postPatch = ''
8556
substituteInPlace nlopt.pc.in \
@@ -123,7 +94,7 @@ clangStdenv.mkDerivation (finalAttrs: {
12394
lib.cmakeFeature "Python_EXECUTABLE" "${buildPythonBindingsEnv.interpreter}"
12495
);
12596

126-
postBuild = ''
97+
postBuild = lib.optionalString withDocs ''
12798
${buildDocsEnv.interpreter} -m mkdocs build \
12899
--config-file ../mkdocs.yml \
129100
--site-dir $doc \

0 commit comments

Comments
 (0)