mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 10:47:44 +00:00
commit
6522b3df90
31
pkgs/by-name/bl/blasfeo/package.nix
Normal file
31
pkgs/by-name/bl/blasfeo/package.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
stdenv,
|
||||
withTarget ? "GENERIC",
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "blasfeo";
|
||||
version = "0.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "giaf";
|
||||
repo = "blasfeo";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-e8InqyUMWRdL4CBHUOtrZkuabaTLiNPMNPRCnWzWkQ4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DTARGET=${withTarget}" ];
|
||||
|
||||
meta = {
|
||||
description = "Basic linear algebra subroutines for embedded optimization";
|
||||
homepage = "https://github.com/giaf/blasfeo";
|
||||
changelog = "https://github.com/giaf/blasfeo/blob/${finalAttrs.version}/Changelog.txt";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
205
pkgs/by-name/ca/casadi/package.nix
Normal file
205
pkgs/by-name/ca/casadi/package.nix
Normal file
@ -0,0 +1,205 @@
|
||||
{
|
||||
#alpaqa,
|
||||
blas,
|
||||
blasfeo,
|
||||
bonmin,
|
||||
bzip2,
|
||||
cbc,
|
||||
clp,
|
||||
cmake,
|
||||
cplex,
|
||||
fatrop,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
gurobi,
|
||||
highs,
|
||||
hpipm,
|
||||
lib,
|
||||
ipopt,
|
||||
lapack,
|
||||
llvmPackages_17, # llvm/Support/Host.h required by casadi 3.6.5 and not available in llvm 18
|
||||
mumps,
|
||||
osqp,
|
||||
pkg-config,
|
||||
pythonSupport ? false,
|
||||
python3Packages,
|
||||
proxsuite,
|
||||
stdenv,
|
||||
sleqp,
|
||||
suitesparse,
|
||||
#sundials,
|
||||
superscs,
|
||||
spral,
|
||||
swig,
|
||||
tinyxml-2,
|
||||
withUnfree ? false,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "casadi";
|
||||
version = "3.6.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "casadi";
|
||||
repo = "casadi";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-T4aaBS918NbUEwWkSx0URi0W9uhCB8IFmzRcOR7T8Og=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "add-FindSPRAL.cmake.patch";
|
||||
url = "https://github.com/casadi/casadi/pull/3792/commits/28bc1b03e67ae06dea0c8557057020f5651be7ad.patch";
|
||||
hash = "sha256-t0+RnXoFakmoX93MhN08RWAbCg6Nerh42LicBBgAkRQ=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch =
|
||||
''
|
||||
# fix case of fatropConfig.cmake & hpipmConfig.cmake
|
||||
substituteInPlace CMakeLists.txt --replace-fail \
|
||||
"FATROP HPIPM" \
|
||||
"fatrop hpipm"
|
||||
|
||||
# nix provide lib/clang headers in libclang, not in llvm.
|
||||
substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \
|
||||
'$'{CLANG_LLVM_LIB_DIR} \
|
||||
${llvmPackages_17.libclang.lib}/lib
|
||||
|
||||
# fix fatrop includes
|
||||
substituteInPlace casadi/interfaces/fatrop/fatrop_conic_interface.hpp --replace-fail \
|
||||
"<ocp/" \
|
||||
"<fatrop/ocp/"
|
||||
|
||||
# fix mumps lib name. No idea where this comes from.
|
||||
substituteInPlace cmake/FindMUMPS.cmake --replace-fail \
|
||||
"mumps_seq" \
|
||||
"mumps"
|
||||
|
||||
# help casadi find its own libs
|
||||
substituteInPlace casadi/core/casadi_os.cpp --replace-fail \
|
||||
"std::vector<std::string> search_paths;" \
|
||||
"std::vector<std::string> search_paths;
|
||||
search_paths.push_back(\"$out/lib\");"
|
||||
''
|
||||
+ lib.optionalString pythonSupport ''
|
||||
# fix including Python.h issue
|
||||
substituteInPlace swig/python/CMakeLists.txt --replace-fail \
|
||||
"add_library(_casadi MODULE \''${PYTHON_FILE})" \
|
||||
"add_library(_casadi MODULE \''${PYTHON_FILE})
|
||||
target_include_directories(_casadi SYSTEM PRIVATE
|
||||
${python3Packages.python}/include/python3.${python3Packages.python.sourceVersion.minor})"
|
||||
|
||||
# I have no clue. without this, it tries to install a non existent file.
|
||||
# maybe a run without SWIG_IMPORT is required before a run with SWIG_IMPORT.
|
||||
# but we need SWIG_IMPORT at some point for something else TODO
|
||||
substituteInPlace swig/python/CMakeLists.txt --replace-fail \
|
||||
"if (SWIG_IMPORT)" \
|
||||
"if (NOT SWIG_IMPORT)"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
#alpaqa
|
||||
blas
|
||||
blasfeo
|
||||
bzip2
|
||||
bonmin
|
||||
cbc
|
||||
clp
|
||||
fatrop
|
||||
highs
|
||||
hpipm
|
||||
ipopt
|
||||
lapack
|
||||
llvmPackages_17.clang
|
||||
llvmPackages_17.libclang
|
||||
llvmPackages_17.llvm
|
||||
mumps
|
||||
osqp
|
||||
proxsuite
|
||||
sleqp
|
||||
suitesparse
|
||||
#sundials
|
||||
superscs
|
||||
spral
|
||||
swig
|
||||
tinyxml-2
|
||||
]
|
||||
++ lib.optionals withUnfree [
|
||||
cplex
|
||||
gurobi
|
||||
]
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.numpy
|
||||
python3Packages.python
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
|
||||
(lib.cmakeBool "WITH_PYTHON3" pythonSupport)
|
||||
(lib.cmakeBool "WITH_JSON" false)
|
||||
(lib.cmakeBool "WITH_INSTALL_INTERNAL_HEADERS" true)
|
||||
(lib.cmakeBool "INSTALL_INTERNAL_HEADERS" true)
|
||||
(lib.cmakeBool "ENABLE_EXPORT_ALL" true)
|
||||
(lib.cmakeBool "SWIG_EXPORT" true)
|
||||
(lib.cmakeBool "SWIG_IMPORT" false)
|
||||
(lib.cmakeBool "WITH_OPENMP" true)
|
||||
(lib.cmakeBool "WITH_THREAD" true)
|
||||
(lib.cmakeBool "WITH_OPENCL" false)
|
||||
(lib.cmakeBool "WITH_BUILD_SUNDIALS" true) # ref. https://github.com/casadi/casadi/issues/2125
|
||||
(lib.cmakeBool "WITH_SUNDIALS" true)
|
||||
(lib.cmakeBool "WITH_BUILD_CSPARSE" false)
|
||||
(lib.cmakeBool "WITH_CSPARSE" true)
|
||||
(lib.cmakeBool "WITH_BLASFEO" true)
|
||||
(lib.cmakeBool "WITH_HPIPM" true)
|
||||
(lib.cmakeBool "WITH_FATROP" false) # invalid new-expression of abstract class type 'casadi::CasadiStructuredQP'
|
||||
(lib.cmakeBool "WITH_BUILD_FATROP" false)
|
||||
(lib.cmakeBool "WITH_SUPERSCS" false) # packaging too chaotic
|
||||
(lib.cmakeBool "WITH_BUILD_OSQP" false)
|
||||
(lib.cmakeBool "WITH_OSQP" true)
|
||||
(lib.cmakeBool "WITH_PROXQP" true)
|
||||
(lib.cmakeBool "WITH_BUILD_TINYXML" false)
|
||||
(lib.cmakeBool "WITH_TINYXML" true)
|
||||
(lib.cmakeBool "WITH_BUILD_DSDP" true) # not sure where this come from
|
||||
(lib.cmakeBool "WITH_DSDP" true)
|
||||
(lib.cmakeBool "WITH_CLANG" true)
|
||||
(lib.cmakeBool "WITH_LAPACK" true)
|
||||
(lib.cmakeBool "WITH_QPOASES" true)
|
||||
(lib.cmakeBool "WITH_BLOCKSQP" true)
|
||||
(lib.cmakeBool "WITH_SLEQP" true)
|
||||
(lib.cmakeBool "WITH_IPOPT" true)
|
||||
(lib.cmakeBool "WITH_KNITRO" withUnfree)
|
||||
(lib.cmakeBool "WITH_SNOPT" withUnfree)
|
||||
(lib.cmakeBool "WITH_WORHP" withUnfree)
|
||||
(lib.cmakeBool "WITH_CPLEX" withUnfree)
|
||||
(lib.cmakeBool "WITH_GUROBI" withUnfree)
|
||||
(lib.cmakeBool "WITH_BONMIN" true)
|
||||
(lib.cmakeBool "WITH_CBC" true)
|
||||
(lib.cmakeBool "WITH_CLP" true)
|
||||
(lib.cmakeBool "WITH_MUMPS" true)
|
||||
(lib.cmakeBool "WITH_SPRAL" true)
|
||||
(lib.cmakeBool "WITH_HSL" withUnfree)
|
||||
(lib.cmakeBool "WITH_HIGHS" true)
|
||||
#(lib.cmakeBool "WITH_ALPAQA" true) # this requires casadi...
|
||||
];
|
||||
|
||||
# I don't know how to pass absolute $out path from cmakeFlags
|
||||
postConfigure = lib.optionalString pythonSupport ''
|
||||
cmake -DPYTHON_PREFIX=$out/${python3Packages.python.sitePackages} ..
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave";
|
||||
homepage = "https://github.com/casadi/casadi";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
56
pkgs/by-name/fa/fatrop/package.nix
Normal file
56
pkgs/by-name/fa/fatrop/package.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
blasfeo,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
llvmPackages,
|
||||
python3Packages,
|
||||
pythonSupport ? false,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "fatrop";
|
||||
version = "0.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "meco-group";
|
||||
repo = "fatrop";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-c4qYh8RutRsMIx3m0oxXy73fnLTBGVZ1QjFcLEJ413Y=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString pythonSupport ''
|
||||
# avoid submodule
|
||||
rmdir external/pybind11
|
||||
ln -s ${python3Packages.pybind11.src} external/pybind11
|
||||
|
||||
# install python module
|
||||
echo "" >> fatropy/CMakeLists.txt
|
||||
echo "install(DIRECTORY fatropy DESTINATION ${python3Packages.python.sitePackages})" >> fatropy/CMakeLists.txt
|
||||
echo "install(TARGETS _fatropy DESTINATION ${python3Packages.python.sitePackages}/fatropy)" >> fatropy/CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs =
|
||||
[ blasfeo ]
|
||||
++ lib.optionals pythonSupport [ python3Packages.pybind11 ]
|
||||
++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_DOCS" true)
|
||||
(lib.cmakeBool "ENABLE_MULTITHREADING" true)
|
||||
(lib.cmakeBool "BUILD_WITH_BLASFEO" false)
|
||||
(lib.cmakeBool "WITH_PYTHON" pythonSupport)
|
||||
(lib.cmakeBool "WITH_SPECTOOL" false) # this depends on casadi
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "nonlinear optimal control problem solver that aims to be fast, support a broad class of optimal control problems and achieve a high numerical robustness";
|
||||
homepage = "https://github.com/meco-group/fatrop";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
39
pkgs/by-name/hp/hpipm/package.nix
Normal file
39
pkgs/by-name/hp/hpipm/package.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
blas,
|
||||
blasfeo,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hpipm";
|
||||
#version = "0.1.3"; not building, use master instead
|
||||
version = "0-unstable-2024-07-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "giaf";
|
||||
repo = "hpipm";
|
||||
rev = "3ab7d6059d9d7da31ec9ff6a8ca84fd8ec5ab5e2";
|
||||
hash = "sha256-TRNHjW2/YDfGJHTG9sy2nmHyk6+HlBGIabPm87TETE8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
blas
|
||||
blasfeo
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBLASFEO_PATH=${blasfeo}"
|
||||
] ++ lib.optionals (!stdenv.isx86_64) [ "-DTARGET=GENERIC" ];
|
||||
|
||||
meta = {
|
||||
description = "High-performance interior-point-method QP and QCQP solvers";
|
||||
homepage = "https://github.com/giaf/hpipm";
|
||||
changelog = "https://github.com/giaf/hpipm/blob/${finalAttrs.src.rev}/Changelog.txt";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
77
pkgs/by-name/mu/mumps/package.nix
Normal file
77
pkgs/by-name/mu/mumps/package.nix
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
blas,
|
||||
fetchzip,
|
||||
fetchpatch,
|
||||
gfortran,
|
||||
lapack,
|
||||
lib,
|
||||
metis,
|
||||
scotch,
|
||||
stdenv,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "mumps";
|
||||
version = "5.7.3";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://mumps-solver.org/MUMPS_${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-ZnIfAuvOBJDYqCtKGlWs0r39nG6X2lAVRuUmeIJenZw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Compatibility with coin-or-mumps version
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/coin-or-tools/ThirdParty-Mumps/bd0bdf9baa3f3677bd34fb36ce63b2b32cc6cc7d/mumps_mpi.patch";
|
||||
hash = "sha256-70qZUKBVBpJOSRxYxng5Y6ct1fdCUQUGur3chDhGabQ=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Compatibility with coin-or-mumps version
|
||||
# https://github.com/coin-or-tools/ThirdParty-Mumps/blob/stable/3.0/get.Mumps#L66
|
||||
cp libseq/mpi.h libseq/mumps_mpi.h
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cp Make.inc/Makefile.debian.SEQ ./Makefile.inc
|
||||
'';
|
||||
|
||||
makeFlags =
|
||||
lib.optionals stdenv.isDarwin [
|
||||
"SONAME="
|
||||
"LIBEXT_SHARED=.dylib"
|
||||
]
|
||||
++ [
|
||||
"LSCOTCHDIR=${scotch}/lib"
|
||||
"ISCOTCH=-I${scotch}/include"
|
||||
"LMETISDIR=${metis}/lib"
|
||||
"IMETIS=-I${metis}/include"
|
||||
"allshared"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r include lib $out
|
||||
|
||||
# Add some compatibility with coin-or-mumps
|
||||
ln -s $out/include $out/include/mumps
|
||||
cp libseq/mumps_mpi.h $out/include
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
metis
|
||||
scotch
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "MUltifrontal Massively Parallel sparse direct Solver";
|
||||
homepage = "http://mumps-solver.org/";
|
||||
license = lib.licenses.cecill-c;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
})
|
97
pkgs/by-name/pr/proxsuite/package.nix
Normal file
97
pkgs/by-name/pr/proxsuite/package.nix
Normal file
@ -0,0 +1,97 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cereal,
|
||||
cmake,
|
||||
doxygen,
|
||||
eigen,
|
||||
jrl-cmakemodules,
|
||||
simde,
|
||||
matio,
|
||||
pythonSupport ? false,
|
||||
python3Packages,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "proxsuite";
|
||||
version = "0.6.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simple-robotics";
|
||||
repo = "proxsuite";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-3kzFYADk3sCMU827KowilPlmOqgv69DJ3mOb7623Qdg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow use of system jrl-cmakemodules
|
||||
# This was merged upstream, and can be removed on next release
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Simple-Robotics/proxsuite/pull/334/commits/2bcadd4993a9940c545136faa71bf1e97a972735.patch";
|
||||
hash = "sha256-BPtwogSwSXcEd5FM4eTTCq6LpGWvQ1SOCFmv/GVhl18=";
|
||||
})
|
||||
# Allow use of system cereal
|
||||
# This was merged upstream, and can be removed on next release
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Simple-Robotics/proxsuite/pull/334/commits/878337c6284c9fd73b19f1f80d5fa802def8cdc6.patch";
|
||||
hash = "sha256-+HWYHLGtygjlvjM+FSD9WFDIwO+qPLlzci+7q42bo0I=";
|
||||
})
|
||||
# Allow use of system pybind11
|
||||
# upstream will move to nanobind for next release, so this can be dismissed
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Simple-Robotics/proxsuite/pull/337/commits/bbed9bdfb214da7c6c6909582971bd8b877f87c2.patch";
|
||||
hash = "sha256-pYikPZinjmk7gsagiaIcQspmGFYwlhdiKdZPnqo7pcQ=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# discard failing tests for now
|
||||
substituteInPlace test/CMakeLists.txt \
|
||||
--replace-fail "proxsuite_test(dense_maros_meszaros src/dense_maros_meszaros.cpp)" "" \
|
||||
--replace-fail "proxsuite_test(sparse_maros_meszaros src/sparse_maros_meszaros.cpp)" ""
|
||||
|
||||
# fix CMake syntax
|
||||
substituteInPlace bindings/python/CMakeLists.txt \
|
||||
--replace-fail "SYSTEM PRIVATE" "PRIVATE"
|
||||
'';
|
||||
|
||||
outputs = [
|
||||
"doc"
|
||||
"out"
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_DOCUMENTATION" true)
|
||||
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
cereal
|
||||
eigen
|
||||
jrl-cmakemodules
|
||||
simde
|
||||
] ++ lib.optionals pythonSupport [ python3Packages.pybind11 ];
|
||||
checkInputs =
|
||||
[ matio ]
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.numpy
|
||||
python3Packages.scipy
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "The Advanced Proximal Optimization Toolbox";
|
||||
homepage = "https://github.com/Simple-Robotics/proxsuite";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
@ -1,24 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
bison,
|
||||
mpi,
|
||||
bzip2,
|
||||
cmake,
|
||||
fetchFromGitLab,
|
||||
flex,
|
||||
gfortran,
|
||||
lib,
|
||||
mpi,
|
||||
stdenv,
|
||||
zlib,
|
||||
xz,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "scotch";
|
||||
version = "7.0.4";
|
||||
|
||||
buildInputs = [
|
||||
bison
|
||||
mpi
|
||||
flex
|
||||
zlib
|
||||
];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.inria.fr";
|
||||
owner = "scotch";
|
||||
@ -27,14 +24,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-uaox4Q9pTF1r2BZjvnU2LE6XkZw3x9mGSKLdRVUobGU=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
cd src
|
||||
ln -s Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gfortran
|
||||
];
|
||||
|
||||
buildFlags = [ "scotch ptscotch" ];
|
||||
|
||||
installFlags = [ "prefix=\${out}" ];
|
||||
buildInputs = [
|
||||
bison
|
||||
bzip2
|
||||
mpi
|
||||
flex
|
||||
xz
|
||||
zlib
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering";
|
||||
@ -45,6 +47,5 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "http://www.labri.fr/perso/pelegrin/scotch";
|
||||
license = lib.licenses.cecill-c;
|
||||
maintainers = [ lib.maintainers.bzizou ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
|
71
pkgs/by-name/sl/sleqp/package.nix
Normal file
71
pkgs/by-name/sl/sleqp/package.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
blas,
|
||||
check,
|
||||
cmake,
|
||||
doxygen,
|
||||
fetchFromGitHub,
|
||||
highs,
|
||||
lapack,
|
||||
lib,
|
||||
pkg-config,
|
||||
pythonSupport ? false,
|
||||
python3Packages,
|
||||
suitesparse,
|
||||
stdenv,
|
||||
trlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sleqp";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chrhansk";
|
||||
repo = "sleqp";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-ycO7s13LT/Gi01XFjTeZQCN+TiAVlp2zXjrlI7vfgTk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bindings/python/cmake/python_install.cmake.in \
|
||||
--replace-fail "--no-deps" "--no-deps --no-cache-dir --no-build-isolation --prefix $out"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
doxygen
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
buildInputs =
|
||||
[
|
||||
blas
|
||||
check
|
||||
highs
|
||||
lapack
|
||||
suitesparse
|
||||
trlib
|
||||
]
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.cython
|
||||
python3Packages.numpy
|
||||
python3Packages.pip
|
||||
python3Packages.pytest
|
||||
python3Packages.setuptools
|
||||
python3Packages.scipy
|
||||
python3Packages.tox
|
||||
python3Packages.wheel
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "SLEQP_ENABLE_PYTHON" pythonSupport)
|
||||
"-DSLEQP_LPS=HiGHS"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "An active set-based NLP solver";
|
||||
homepage = "https://github.com/chrhansk/sleqp";
|
||||
changelog = "https://github.com/chrhansk/sleqp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
65
pkgs/by-name/sp/spral/package.nix
Normal file
65
pkgs/by-name/sp/spral/package.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
blas,
|
||||
fetchFromGitHub,
|
||||
gfortran,
|
||||
lapack,
|
||||
lib,
|
||||
llvmPackages,
|
||||
meson,
|
||||
metis,
|
||||
ninja,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "spral";
|
||||
version = "2024.05.08";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ralna";
|
||||
repo = "spral";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-1CdRwQ0LQrYcXvoGtGxR9Ug3Q2N4skXq8z+LdNpv8p4=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
''
|
||||
# Skipped test: ssidst
|
||||
# hwloc/linux: failed to find sysfs cpu topology directory, aborting linux discovery.
|
||||
substituteInPlace tests/meson.build --replace-fail \
|
||||
"subdir('ssids')" \
|
||||
""
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
# Skipped test: lsmrt, segfault
|
||||
substituteInPlace tests/meson.build --replace-fail \
|
||||
"['lsmrt', files('lsmr.f90')]," \
|
||||
""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
gfortran
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
metis
|
||||
] ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ];
|
||||
|
||||
mesonFlags = [ (lib.mesonBool "tests" true) ];
|
||||
|
||||
LDFLAGS = lib.optionals stdenv.isDarwin [ "-lomp" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Sparse Parallel Robust Algorithms Library";
|
||||
homepage = "https://github.com/ralna/spral";
|
||||
changelog = "https://github.com/ralna/spral/blob/${src.rev}/ChangeLog";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
}
|
44
pkgs/by-name/su/superscs/package.nix
Normal file
44
pkgs/by-name/su/superscs/package.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
blas,
|
||||
lapack,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "superscs";
|
||||
version = "1.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kul-optec";
|
||||
repo = "superscs";
|
||||
#rev = "v${finalAttrs.version}";
|
||||
# ref. https://github.com/kul-optec/superscs/pull/38
|
||||
rev = "500070e807f92347a7c6cbdc96739521a256b71e";
|
||||
hash = "sha256-Qu7RM6Ew4hEmoIXO0utDDVmjmNX3yt3FxWZXCQ/Xjp4=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Makefile --replace-fail \
|
||||
".so" \
|
||||
".dylib"
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Fast conic optimization in C";
|
||||
homepage = "https://github.com/kul-optec/superscs";
|
||||
changelog = "https://github.com/kul-optec/superscs/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
49
pkgs/by-name/tr/trlib/package.nix
Normal file
49
pkgs/by-name/tr/trlib/package.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
blas,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
lib,
|
||||
pythonSupport ? false,
|
||||
python3Packages,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "trlib";
|
||||
version = "0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "felixlen";
|
||||
repo = "trlib";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-pD2MGsIQgMO4798Gp9oLprKhmV0lcjgtUHh1rvEjSIY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# update use of distutils
|
||||
# This PR was merged upstream, so the patch can be removed on next release
|
||||
(fetchpatch {
|
||||
name = "python312-support.patch";
|
||||
url = "https://github.com/felixlen/trlib/pull/26/commits/6b72f3b2afebee4ae179bc760f93b16c60fd72d8.patch";
|
||||
hash = "sha256-+6iiALFhMSiE44kpkDrhwrYt4miHlPkiffRZAgsM1Jo=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs =
|
||||
[ blas ]
|
||||
++ lib.optionals pythonSupport [
|
||||
python3Packages.cython
|
||||
python3Packages.numpy
|
||||
];
|
||||
|
||||
cmakeFlags = [ (lib.cmakeBool "TRLIB_BUILD_PYTHON3" pythonSupport) ];
|
||||
|
||||
meta = {
|
||||
description = "Trust Region Subproblem Solver Library";
|
||||
homepage = "https://github.com/felixlen/trlib";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
};
|
||||
})
|
@ -2,10 +2,12 @@
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, casadi
|
||||
, cmake
|
||||
, boost
|
||||
, eigen
|
||||
, example-robot-data
|
||||
, casadiSupport ? !stdenv.isDarwin
|
||||
, collisionSupport ? true
|
||||
, console-bridge
|
||||
, jrl-cmakemodules
|
||||
@ -41,11 +43,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
];
|
||||
|
||||
# example-robot-data models are used in checks.
|
||||
# Upstream provide them as git submodule, but we can use our own version instead.
|
||||
postPatch = ''
|
||||
# example-robot-data models are used in checks.
|
||||
# Upstream provide them as git submodule, but we can use our own version instead.
|
||||
rmdir models/example-robot-data
|
||||
ln -s ${example-robot-data.src} models/example-robot-data
|
||||
|
||||
# allow package:// uri use in examples
|
||||
export ROS_PACKAGE_PATH=${example-robot-data}/share
|
||||
'';
|
||||
|
||||
# CMAKE_BUILD_TYPE defaults to Release in this package,
|
||||
@ -75,11 +80,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
python3Packages.eigenpy
|
||||
] ++ lib.optionals (pythonSupport && collisionSupport) [
|
||||
python3Packages.hpp-fcl
|
||||
] ++ lib.optionals (!pythonSupport && casadiSupport) [
|
||||
casadi
|
||||
] ++ lib.optionals (pythonSupport && casadiSupport) [
|
||||
python3Packages.casadi
|
||||
];
|
||||
|
||||
checkInputs = lib.optionals (pythonSupport && casadiSupport) [ python3Packages.matplotlib ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
|
||||
(lib.cmakeBool "BUILD_WITH_LIBPYTHON" pythonSupport)
|
||||
(lib.cmakeBool "BUILD_WITH_CASADI_SUPPORT" casadiSupport)
|
||||
(lib.cmakeBool "BUILD_WITH_COLLISION_SUPPORT" collisionSupport)
|
||||
];
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
, lapack
|
||||
, gfortran
|
||||
, enableAMPL ? true, libamplsolver
|
||||
, enableMUMPS ? !stdenv.isDarwin, mumps, mpi
|
||||
, enableSPRAL ? true, spral
|
||||
}:
|
||||
|
||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||
@ -23,21 +25,30 @@ stdenv.mkDerivation rec {
|
||||
|
||||
CXXDEFS = [ "-DHAVE_RAND" "-DHAVE_CSTRING" "-DHAVE_CSTDIO" ];
|
||||
|
||||
configureFlags = [
|
||||
configureFlags = lib.optionals enableAMPL [
|
||||
"--with-asl-cflags=-I${libamplsolver}/include"
|
||||
"--with-asl-lflags=-lamplsolver"
|
||||
] ++ lib.optionals enableMUMPS [
|
||||
"--with-mumps-cflags=-I${mumps}/include"
|
||||
"--with-mumps-lflags=-ldmumps"
|
||||
] ++ lib.optionals enableSPRAL [
|
||||
"--with-spral-cflags=-I${spral}/include"
|
||||
"--with-spral-lflags=-lspral"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config gfortran ];
|
||||
buildInputs = [ blas lapack ] ++ lib.optionals enableAMPL [ libamplsolver ];
|
||||
buildInputs = [ blas lapack ]
|
||||
++ lib.optionals enableAMPL [ libamplsolver ]
|
||||
++ lib.optionals enableMUMPS [ mumps mpi ]
|
||||
++ lib.optionals enableSPRAL [ spral ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Software package for large-scale nonlinear optimization";
|
||||
homepage = "https://projects.coin-or.org/Ipopt";
|
||||
license = licenses.epl10;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
license = lib.licenses.epl10;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
|
@ -15,6 +15,14 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# ref https://github.com/osqp/osqp/pull/481
|
||||
# but this patch does not apply directly on v0.6.3
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace-fail \
|
||||
"$<INSTALL_PREFIX>/\''${CMAKE_INSTALL_INCLUDEDIR}" \
|
||||
"\''${CMAKE_INSTALL_FULL_INCLUDEDIR}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1994,6 +1994,8 @@ self: super: with self; {
|
||||
|
||||
casa-formats-io = callPackage ../development/python-modules/casa-formats-io { };
|
||||
|
||||
casadi = toPythonModule (pkgs.casadi.override { pythonSupport = true; python3Packages = self; });
|
||||
|
||||
casbin = callPackage ../development/python-modules/casbin { };
|
||||
|
||||
cashaddress = callPackage ../development/python-modules/cashaddress { };
|
||||
@ -4266,6 +4268,8 @@ self: super: with self; {
|
||||
|
||||
fasttext-predict = callPackage ../development/python-modules/fasttext-predict { };
|
||||
|
||||
fatrop = toPythonModule (pkgs.fatrop.override { pythonSupport = true; python3Packages = self; });
|
||||
|
||||
faust-cchardet = callPackage ../development/python-modules/faust-cchardet { };
|
||||
|
||||
favicon = callPackage ../development/python-modules/favicon { };
|
||||
@ -10219,6 +10223,8 @@ self: super: with self; {
|
||||
|
||||
propka = callPackage ../development/python-modules/propka { };
|
||||
|
||||
proxsuite = toPythonModule (pkgs.proxsuite.override { pythonSupport = true; python3Packages = self; });
|
||||
|
||||
proxy-tools = callPackage ../development/python-modules/proxy-tools { };
|
||||
|
||||
proxy-db = callPackage ../development/python-modules/proxy-db { };
|
||||
@ -14434,6 +14440,8 @@ self: super: with self; {
|
||||
|
||||
sleepyq = callPackage ../development/python-modules/sleepyq { };
|
||||
|
||||
sleqp = toPythonModule (pkgs.sleqp.override { pythonSupport = true; python3Packages = self; });
|
||||
|
||||
slicedimage = callPackage ../development/python-modules/slicedimage { };
|
||||
|
||||
slicer = callPackage ../development/python-modules/slicer { };
|
||||
@ -15874,6 +15882,8 @@ self: super: with self; {
|
||||
|
||||
tritonclient = callPackage ../development/python-modules/tritonclient { };
|
||||
|
||||
trlib = toPythonModule (pkgs.trlib.override { pythonSupport = true; python3Packages = self;});
|
||||
|
||||
troposphere = callPackage ../development/python-modules/troposphere { };
|
||||
|
||||
trove-classifiers = callPackage ../development/python-modules/trove-classifiers { };
|
||||
|
Loading…
Reference in New Issue
Block a user