2018-08-18 04:06:00 +01:00
|
|
|
{ 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
|
|
|
|
'';
|
|
|
|
|
2018-08-18 17:11:06 +01:00
|
|
|
doCheck = true;
|
2018-08-18 04:06:00 +01:00
|
|
|
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;
|
2018-08-18 17:11:06 +01:00
|
|
|
platforms = platforms.all;
|
2018-08-18 04:06:00 +01:00
|
|
|
maintainers = [ maintainers.bhipple ];
|
|
|
|
};
|
|
|
|
}
|