diff options
author | Benjamin Hipple <bhipple@protonmail.com> | 2018-08-23 17:26:41 -0400 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-08-23 23:26:41 +0200 |
commit | 291de70ed6b736285ae4de6e3e556c0fc86c2348 (patch) | |
tree | 03b9cf3f5ad7b26ff28389ed350e1fc8f65620b9 /pkgs/development/libraries/science/math/scs | |
parent | 714ef2fb645e902d8cebd93f546219b4e038b5b0 (diff) |
scs: init at 2.0.2 (#45294)
Diffstat (limited to 'pkgs/development/libraries/science/math/scs')
-rw-r--r-- | pkgs/development/libraries/science/math/scs/default.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/development/libraries/science/math/scs/default.nix b/pkgs/development/libraries/science/math/scs/default.nix new file mode 100644 index 000000000000..0539083e823c --- /dev/null +++ b/pkgs/development/libraries/science/math/scs/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub, blas, liblapack, gfortran }: + +stdenv.mkDerivation rec { + name = "scs-${version}"; + version = "2.0.2"; + + src = fetchFromGitHub { + owner = "cvxgrp"; + repo = "scs"; + rev = "v${version}"; + sha256 = "17lbcmcsniqlyzgbzmjipfd0rrk25a8hzh7l5wl2wp1iwsd8c3a9"; + }; + + buildInputs = [ blas liblapack gfortran.cc.lib ]; + + # Actually link and add libgfortran to the rpath + patchPhase = '' + sed -i 's/#-lgfortran/-lgfortran/' scs.mk + ''; + + doCheck = true; + + # Test demo requires passing any int as $1; 42 chosen arbitrarily + checkPhase = '' + ./out/demo_socp_indirect 42 + ''; + + installPhase = '' + mkdir -p $out/lib + cp -r include $out/ + cp out/*.a out/*.so $out/lib/ + ''; + + meta = with stdenv.lib; { + description = "Splitting Conic Solver"; + longDescription = '' + Numerical optimization package for solving large-scale convex cone problems + ''; + homepage = https://github.com/cvxgrp/scs; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.bhipple ]; + }; +} |