evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / sl / sleqp / package.nix
blob4ca9983ba2a70e474be495f827b9b4abaf1a4215
2   blas,
3   check,
4   cmake,
5   doxygen,
6   fetchFromGitHub,
7   highs,
8   lapack,
9   lib,
10   pkg-config,
11   pythonSupport ? false,
12   python3Packages,
13   suitesparse,
14   stdenv,
15   trlib,
18 stdenv.mkDerivation (finalAttrs: {
19   pname = "sleqp";
20   version = "1.0.2";
22   src = fetchFromGitHub {
23     owner = "chrhansk";
24     repo = "sleqp";
25     rev = "v${finalAttrs.version}";
26     hash = "sha256-ycO7s13LT/Gi01XFjTeZQCN+TiAVlp2zXjrlI7vfgTk=";
27   };
29   postPatch = ''
30     substituteInPlace bindings/python/cmake/python_install.cmake.in \
31       --replace-fail "--no-deps" "--no-deps --no-cache-dir --no-build-isolation --prefix $out"
32   '';
34   nativeBuildInputs = [
35     doxygen
36     cmake
37     pkg-config
38   ];
39   buildInputs =
40     [
41       blas
42       check
43       highs
44       lapack
45       suitesparse
46       trlib
47     ]
48     ++ lib.optionals pythonSupport [
49       python3Packages.cython
50       python3Packages.numpy
51       python3Packages.pip
52       python3Packages.pytest
53       python3Packages.setuptools
54       python3Packages.scipy
55       python3Packages.tox
56       python3Packages.wheel
57     ];
59   cmakeFlags = [
60     (lib.cmakeBool "SLEQP_ENABLE_PYTHON" pythonSupport)
61     "-DSLEQP_LPS=HiGHS"
62   ];
64   meta = {
65     description = "An active set-based NLP solver";
66     homepage = "https://github.com/chrhansk/sleqp";
67     changelog = "https://github.com/chrhansk/sleqp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
68     license = lib.licenses.lgpl3Only;
69     maintainers = with lib.maintainers; [ nim65s ];
70   };