From 460029cf94f35e94a5d817104920c903228f50ee Mon Sep 17 00:00:00 2001 From: Benjamin Hipple Date: Sat, 18 Aug 2018 03:06:00 +0000 Subject: [PATCH 1/2] ecos: init at 2.0.6 --- .../libraries/science/math/ecos/default.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/libraries/science/math/ecos/default.nix 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..44bc3c46ccdf --- /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"; + }; + + doCheck = true; + + buildPhase = '' + make all shared + ''; + + 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; + maintainers = [ maintainers.bhipple ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e3508b9d7c3a..2d01591810b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20552,6 +20552,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 { }; From 65bb0b23b9051a5732bb1baa688c679895c92f07 Mon Sep 17 00:00:00 2001 From: Benjamin Hipple Date: Sat, 18 Aug 2018 12:11:06 -0400 Subject: [PATCH 2/2] Add platforms.all --- pkgs/development/libraries/science/math/ecos/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/ecos/default.nix b/pkgs/development/libraries/science/math/ecos/default.nix index 44bc3c46ccdf..645a865eb955 100644 --- a/pkgs/development/libraries/science/math/ecos/default.nix +++ b/pkgs/development/libraries/science/math/ecos/default.nix @@ -11,12 +11,11 @@ stdenv.mkDerivation rec { sha256 = "11v958j66wq30gxpjpkgl7n3rvla845lygz8fl39pgf1vk9sdyc7"; }; - doCheck = true; - buildPhase = '' make all shared ''; + doCheck = true; checkPhase = '' make test ./runecos @@ -32,6 +31,7 @@ stdenv.mkDerivation rec { 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 ]; }; }