
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19
.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
92 lines
1.9 KiB
Nix
92 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fontconfig,
|
|
gfortran,
|
|
pkg-config,
|
|
blas,
|
|
bzip2,
|
|
cbc,
|
|
clp,
|
|
doxygen,
|
|
graphviz,
|
|
ipopt,
|
|
lapack,
|
|
libamplsolver,
|
|
osi,
|
|
texliveSmall,
|
|
zlib,
|
|
}:
|
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "bonmin";
|
|
version = "1.8.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coin-or";
|
|
repo = "Bonmin";
|
|
rev = "releases/${version}";
|
|
sha256 = "sha256-nqjAQ1NdNJ/T4p8YljEWRt/uy2aDwyBeAsag0TmRc5Q=";
|
|
};
|
|
|
|
__structuredAttrs = true;
|
|
|
|
nativeBuildInputs = [
|
|
doxygen
|
|
gfortran
|
|
graphviz
|
|
pkg-config
|
|
texliveSmall
|
|
];
|
|
buildInputs = [
|
|
blas
|
|
bzip2
|
|
cbc
|
|
clp
|
|
ipopt
|
|
lapack
|
|
libamplsolver
|
|
osi
|
|
zlib
|
|
];
|
|
|
|
configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"--with-asl-lib=-lipoptamplinterface -lamplsolver"
|
|
];
|
|
|
|
# Fix doc install. Should not be necessary after next release
|
|
# ref https://github.com/coin-or/Bonmin/commit/4f665bc9e489a73cb867472be9aea518976ecd28
|
|
sourceRoot = "${src.name}/Bonmin";
|
|
|
|
# Fontconfig error: Cannot load default config file: No such file: (null)
|
|
env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
|
|
|
|
# Fontconfig error: No writable cache directories
|
|
preBuild = "export XDG_CACHE_HOME=$(mktemp -d)";
|
|
|
|
doCheck = true;
|
|
checkTarget = "test";
|
|
|
|
# ignore one failing test
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace test/Makefile.in --replace-fail \
|
|
"./unitTest\''$(EXEEXT)" \
|
|
""
|
|
'';
|
|
|
|
# install documentation
|
|
postInstall = "make install-doxygen-docs";
|
|
|
|
meta = {
|
|
description = "Open-source code for solving general MINLP (Mixed Integer NonLinear Programming) problems";
|
|
mainProgram = "bonmin";
|
|
homepage = "https://github.com/coin-or/Bonmin";
|
|
license = lib.licenses.epl10;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ aanderse ];
|
|
};
|
|
}
|