Skip to content

Commit 80b560b

Browse files
authored
fatrop: 0.0.1 -> 0.0.4, casadi: 3.6.6 -> 3.6.7 (#339110)
2 parents c30d47a + fd65959 commit 80b560b

File tree

2 files changed

+7
-32
lines changed

2 files changed

+7
-32
lines changed

pkgs/by-name/ca/casadi/package.nix

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
cplex,
1111
fatrop,
1212
fetchFromGitHub,
13-
fetchpatch,
1413
gurobi,
1514
highs,
1615
hpipm,
@@ -37,40 +36,27 @@
3736

3837
stdenv.mkDerivation (finalAttrs: {
3938
pname = "casadi";
40-
version = "3.6.6";
39+
version = "3.6.7";
4140

4241
src = fetchFromGitHub {
4342
owner = "casadi";
4443
repo = "casadi";
4544
rev = finalAttrs.version;
46-
hash = "sha256-T4aaBS918NbUEwWkSx0URi0W9uhCB8IFmzRcOR7T8Og=";
45+
hash = "sha256-Mft0qhjdAbU82RgjYuKue5p7EqbTbt3ii5yXSsCFHrQ=";
4746
};
4847

49-
patches = [
50-
(fetchpatch {
51-
name = "add-FindSPRAL.cmake.patch";
52-
url = "https://github.com/casadi/casadi/pull/3792/commits/28bc1b03e67ae06dea0c8557057020f5651be7ad.patch";
53-
hash = "sha256-t0+RnXoFakmoX93MhN08RWAbCg6Nerh42LicBBgAkRQ=";
54-
})
55-
];
56-
5748
postPatch =
5849
''
59-
# fix case of fatropConfig.cmake & hpipmConfig.cmake
50+
# fix case of hpipmConfig.cmake
6051
substituteInPlace CMakeLists.txt --replace-fail \
6152
"FATROP HPIPM" \
62-
"fatrop hpipm"
53+
"FATROP hpipm"
6354
6455
# nix provide lib/clang headers in libclang, not in llvm.
6556
substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \
6657
'$'{CLANG_LLVM_LIB_DIR} \
6758
${llvmPackages_17.libclang.lib}/lib
6859
69-
# fix fatrop includes
70-
substituteInPlace casadi/interfaces/fatrop/fatrop_conic_interface.hpp --replace-fail \
71-
"<ocp/" \
72-
"<fatrop/ocp/"
73-
7460
# fix mumps lib name. No idea where this comes from.
7561
substituteInPlace cmake/FindMUMPS.cmake --replace-fail \
7662
"mumps_seq" \
@@ -173,7 +159,7 @@ stdenv.mkDerivation (finalAttrs: {
173159
(lib.cmakeBool "WITH_CSPARSE" true)
174160
(lib.cmakeBool "WITH_BLASFEO" true)
175161
(lib.cmakeBool "WITH_HPIPM" true)
176-
(lib.cmakeBool "WITH_FATROP" false) # invalid new-expression of abstract class type 'casadi::CasadiStructuredQP'
162+
(lib.cmakeBool "WITH_FATROP" true)
177163
(lib.cmakeBool "WITH_BUILD_FATROP" false)
178164
(lib.cmakeBool "WITH_SUPERSCS" false) # packaging too chaotic
179165
(lib.cmakeBool "WITH_BUILD_OSQP" false)

pkgs/by-name/fa/fatrop/package.nix

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,15 @@
1111

1212
stdenv.mkDerivation (finalAttrs: {
1313
pname = "fatrop";
14-
version = "0.0.1";
14+
version = "0.0.4";
1515

1616
src = fetchFromGitHub {
1717
owner = "meco-group";
1818
repo = "fatrop";
1919
rev = "v${finalAttrs.version}";
20-
hash = "sha256-c4qYh8RutRsMIx3m0oxXy73fnLTBGVZ1QjFcLEJ413Y=";
20+
hash = "sha256-XVOS9L2vQeFkPXZieX1ZJiVagR0f2BtiRmSDPB9LQeI=";
2121
};
2222

23-
postPatch = lib.optionalString pythonSupport ''
24-
# avoid submodule
25-
rmdir external/pybind11
26-
ln -s ${python3Packages.pybind11.src} external/pybind11
27-
28-
# install python module
29-
echo "" >> fatropy/CMakeLists.txt
30-
echo "install(DIRECTORY fatropy DESTINATION ${python3Packages.python.sitePackages})" >> fatropy/CMakeLists.txt
31-
echo "install(TARGETS _fatropy DESTINATION ${python3Packages.python.sitePackages}/fatropy)" >> fatropy/CMakeLists.txt
32-
'';
33-
3423
nativeBuildInputs = [ cmake ];
3524
buildInputs =
3625
[ blasfeo ]

0 commit comments

Comments
 (0)