From bdd0717f549901a70a493ee803822e2c19337b4e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 12 Aug 2024 10:44:18 +0200 Subject: [PATCH] bonmin: build documentation --- .../libraries/science/math/bonmin/default.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/development/libraries/science/math/bonmin/default.nix b/pkgs/development/libraries/science/math/bonmin/default.nix index 1a77f7377d73..ab325140f3ac 100644 --- a/pkgs/development/libraries/science/math/bonmin/default.nix +++ b/pkgs/development/libraries/science/math/bonmin/default.nix @@ -1,15 +1,19 @@ { lib , stdenv , fetchFromGitHub +, fontconfig , gfortran , pkg-config , blas , bzip2 , cbc , clp +, doxygen +, graphviz , ipopt , lapack , libamplsolver +, texliveSmall , zlib }: @@ -27,8 +31,11 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + doxygen gfortran + graphviz pkg-config + texliveSmall ]; buildInputs = [ blas @@ -45,6 +52,19 @@ stdenv.mkDerivation rec { "--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)"; + + # install documentation + postInstall = "make install-doxygen-docs"; + meta = { description = "Open-source code for solving general MINLP (Mixed Integer NonLinear Programming) problems"; mainProgram = "bonmin";