Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 46 lines 1.2 kB view raw
1{ 2 blasfeo, 3 cmake, 4 fetchFromGitHub, 5 lib, 6 llvmPackages, 7 python3Packages, 8 pythonSupport ? false, 9 stdenv, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "fatrop"; 14 version = "0.0.4"; 15 16 src = fetchFromGitHub { 17 owner = "meco-group"; 18 repo = "fatrop"; 19 rev = "v${finalAttrs.version}"; 20 hash = "sha256-XVOS9L2vQeFkPXZieX1ZJiVagR0f2BtiRmSDPB9LQeI="; 21 }; 22 23 nativeBuildInputs = [ cmake ]; 24 buildInputs = [ 25 blasfeo 26 ] 27 ++ lib.optionals pythonSupport [ python3Packages.pybind11 ] 28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.openmp ]; 29 30 cmakeFlags = [ 31 (lib.cmakeBool "BUILD_DOCS" true) 32 (lib.cmakeBool "ENABLE_MULTITHREADING" true) 33 (lib.cmakeBool "BUILD_WITH_BLASFEO" false) 34 (lib.cmakeBool "WITH_PYTHON" pythonSupport) 35 (lib.cmakeBool "WITH_SPECTOOL" false) # this depends on casadi 36 ]; 37 38 doCheck = true; 39 40 meta = { 41 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"; 42 homepage = "https://github.com/meco-group/fatrop"; 43 license = lib.licenses.lgpl3Only; 44 maintainers = with lib.maintainers; [ nim65s ]; 45 }; 46})