1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 gmp,
6 cmake,
7 python3,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "libpoly";
12 version = "0.2.0";
13
14 src = fetchFromGitHub {
15 owner = "SRI-CSL";
16 repo = "libpoly";
17 # they've pushed to the release branch, use explicit tag
18 tag = "v${version}";
19 sha256 = "sha256-gE2O1YfiVab/aIqheoMP8GhE+N3yho7kb5EP56pzjW8=";
20 };
21
22 postPatch = ''
23 substituteInPlace src/CMakeLists.txt \
24 --replace-warn " -Werror " " "
25 '';
26
27 nativeBuildInputs = [ cmake ];
28
29 buildInputs = [
30 gmp
31 python3
32 ];
33
34 strictDeps = true;
35
36 meta = with lib; {
37 homepage = "https://github.com/SRI-CSL/libpoly";
38 description = "C library for manipulating polynomials";
39 license = licenses.lgpl3;
40 platforms = platforms.all;
41 };
42}