3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/logic/poly/default.nix

35 lines
918 B
Nix
Raw Normal View History

2021-03-26 09:56:03 +00:00
{lib, stdenv, fetchFromGitHub, gmp, cmake, python3}:
stdenv.mkDerivation rec {
pname = "libpoly";
2021-07-28 01:31:53 +01:00
version = "0.1.10";
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=";
};
# 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}'
'';
nativeBuildInputs = [ cmake ];
2021-03-26 09:56:03 +00:00
buildInputs = [ gmp python3 ];
strictDeps = true;
meta = with lib; {
2020-03-26 10:48:43 +00:00
homepage = "https://github.com/SRI-CSL/libpoly";
description = "C library for manipulating polynomials";
license = licenses.lgpl3;
platforms = platforms.all;
};
}