diff --git a/pkgs/development/libraries/science/math/ecos/default.nix b/pkgs/development/libraries/science/math/ecos/default.nix new file mode 100644 index 000000000000..645a865eb955 --- /dev/null +++ b/pkgs/development/libraries/science/math/ecos/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "ecos-${version}"; + version = "2.0.6"; + + src = fetchFromGitHub { + owner = "embotech"; + repo = "ecos"; + rev = "v${version}"; + sha256 = "11v958j66wq30gxpjpkgl7n3rvla845lygz8fl39pgf1vk9sdyc7"; + }; + + buildPhase = '' + make all shared + ''; + + doCheck = true; + checkPhase = '' + make test + ./runecos + ''; + + installPhase = '' + mkdir -p $out/lib + cp lib*.a lib*.so $out/lib + cp -r include $out/ + ''; + + meta = with stdenv.lib; { + description = "A lightweight conic solver for second-order cone programming"; + homepage = https://www.embotech.com/ECOS; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = [ maintainers.bhipple ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 945b78fe33a2..8ab22e40b0b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20559,6 +20559,8 @@ with pkgs; cliquer = callPackage ../development/libraries/science/math/cliquer { }; + ecos = callPackage ../development/libraries/science/math/ecos { }; + flintqs = callPackage ../development/libraries/science/math/flintqs { }; gurobi = callPackage ../applications/science/math/gurobi { };