mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
78 lines
1.7 KiB
Nix
78 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
blas,
|
|
lapack,
|
|
gfortran,
|
|
enableAMPL ? true,
|
|
libamplsolver,
|
|
enableMUMPS ? true,
|
|
mumps,
|
|
enableSPRAL ? true,
|
|
spral,
|
|
}:
|
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
|
assert !mumps.mpiSupport;
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ipopt";
|
|
version = "3.14.20";
|
|
|
|
__structuredAttrs = true;
|
|
srictDeps = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coin-or";
|
|
repo = "Ipopt";
|
|
tag = "releases/${finalAttrs.version}";
|
|
hash = "sha256-bQo/AxzbgKCnL8VZuvq/w3qgrtzg67kIOqQTa1zQuSY=";
|
|
};
|
|
|
|
outputs =
|
|
# The solver executables for AMPL modeling environment are only installed
|
|
# when AMPL is available.
|
|
lib.optional enableAMPL "bin" ++ [
|
|
"out"
|
|
"dev"
|
|
"doc"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
gfortran
|
|
];
|
|
|
|
buildInputs = [
|
|
blas
|
|
lapack
|
|
]
|
|
++ lib.optional enableMUMPS mumps
|
|
++ lib.optional enableSPRAL spral
|
|
++ lib.optional enableAMPL libamplsolver;
|
|
|
|
configureFlags =
|
|
lib.optionals enableMUMPS [
|
|
"--with-mumps-cflags=-I${lib.getDev mumps}/include/mumps_seq"
|
|
"--with-mumps-lflags=-ldmumps"
|
|
]
|
|
++ lib.optional enableSPRAL "--with-spral-lflags=-lspral"
|
|
++ lib.optional enableAMPL "--with-asl-lflags=-lamplsolver";
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = {
|
|
changelog = "https://github.com/coin-or/Ipopt/releases/tag/releases%2F${finalAttrs.version}";
|
|
description = "Software package for large-scale nonlinear optimization";
|
|
homepage = "https://projects.coin-or.org/Ipopt";
|
|
license = lib.licenses.epl20;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [
|
|
nim65s
|
|
qbisi
|
|
];
|
|
};
|
|
})
|