2021-03-26 09:56:03 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, gmp, cmake, python3}:
|
2017-07-07 05:30:30 +01:00
|
|
|
|
2018-07-12 23:00:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libpoly";
|
2021-07-28 01:31:53 +01:00
|
|
|
version = "0.1.10";
|
2017-07-07 05:30:30 +01:00
|
|
|
|
2018-07-12 23:00:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SRI-CSL";
|
|
|
|
repo = "libpoly";
|
2020-04-09 18:39:15 +01:00
|
|
|
# they've pushed to the release branch, use explicit tag
|
|
|
|
rev = "refs/tags/v${version}";
|
2021-07-28 01:31:53 +01:00
|
|
|
sha256 = "sha256-22Y4L5NFnCzKwZt0A/ChMuGPU4Dk1Qyke6mdvfN063w=";
|
2017-07-07 05:30:30 +01:00
|
|
|
};
|
|
|
|
|
2021-05-21 23:00:19 +01:00
|
|
|
# https://github.com/SRI-CSL/libpoly/pull/52
|
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/CMakeLists.txt --replace \
|
|
|
|
'"utils/open_memstream.c ''${poly_SOURCES}"' \
|
|
|
|
'utils/open_memstream.c ''${poly_SOURCES}'
|
|
|
|
'';
|
|
|
|
|
2018-07-12 23:00:33 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-03-26 09:56:03 +00:00
|
|
|
buildInputs = [ gmp python3 ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2017-07-07 05:30:30 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-26 10:48:43 +00:00
|
|
|
homepage = "https://github.com/SRI-CSL/libpoly";
|
2017-07-07 05:30:30 +01:00
|
|
|
description = "C library for manipulating polynomials";
|
2017-07-07 20:54:32 +01:00
|
|
|
license = licenses.lgpl3;
|
2017-07-07 05:30:30 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|