nixpkgs/pkgs/applications/science/math/gfan/default.nix

31 lines
936 B
Nix
Raw Normal View History

2021-01-15 14:21:58 +01:00
{lib, stdenv, fetchurl, gmp, mpir, cddlib}:
2016-10-10 20:35:32 +02:00
stdenv.mkDerivation rec {
pname = "gfan";
version = "0.6.2";
2017-08-30 18:19:00 +02:00
2016-10-10 20:35:32 +02:00
src = fetchurl {
url = "http://home.math.au.dk/jensen/software/gfan/gfan${version}.tar.gz";
sha256 = "02pihqb1lb76a0xbfwjzs1cd6ay3ldfxsm8dvsbl6qs3vkjxax56";
2016-10-10 20:35:32 +02:00
};
2017-08-30 18:19:00 +02:00
patches = [
./gfan-0.6.2-cddlib-prefix.patch
];
2021-01-15 14:21:58 +01:00
postPatch = lib.optionalString stdenv.cc.isClang ''
2018-08-14 06:15:36 +02:00
substituteInPlace Makefile --replace "-fno-guess-branch-probability" ""
'';
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ];
installFlags = [ "PREFIX=$(out)" ];
2018-08-14 06:15:36 +02:00
buildInputs = [ gmp mpir cddlib ];
2017-08-30 18:19:00 +02:00
2016-10-10 20:35:32 +02:00
meta = {
description = "A software package for computing Gröbner fans and tropical varieties";
2021-01-15 14:21:58 +01:00
license = lib.licenses.gpl2 ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.unix;
homepage = "http://home.math.au.dk/jensen/software/gfan/gfan.html";
2016-10-10 20:35:32 +02:00
};
}