Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 fetchurl, 3 fetchpatch, 4 lib, 5 stdenv, 6 gmpxx, 7 perl, 8 gnum4, 9}: 10 11let 12 version = "1.2"; 13in 14 15stdenv.mkDerivation { 16 pname = "ppl"; 17 inherit version; 18 19 src = fetchurl { 20 url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2"; 21 sha256 = "1wgxcbgmijgk11df43aiqfzv31r3bkxmgb4yl68g21194q60nird"; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 name = "clang5-support.patch"; 27 url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ppl/patches/clang5-support.patch"; 28 sha256 = "1zj90hm25pkgvk4jlkfzh18ak9b98217gbidl3731fdccbw6hr87"; 29 }) 30 ]; 31 32 postPatch = lib.optionalString stdenv.cc.isClang '' 33 substituteInPlace src/PIP_Tree.cc \ 34 --replace "std::auto_ptr" "std::unique_ptr" 35 substituteInPlace src/Powerset_inlines.hh src/Pointset_Powerset_inlines.hh \ 36 --replace "std::mem_fun_ref" "std::mem_fn" 37 ''; 38 39 nativeBuildInputs = [ 40 perl 41 gnum4 42 ]; 43 propagatedBuildInputs = [ gmpxx ]; 44 45 configureFlags = [ 46 "--disable-watchdog" 47 ] 48 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 49 "CPPFLAGS=-fexceptions" 50 "--disable-ppl_lcdd" 51 "--disable-ppl_lpsol" 52 "--disable-ppl_pips" 53 ]; 54 55 # Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz 56 # x86_64 box. Nevertheless, being a dependency of GCC, it probably ought 57 # to be tested. 58 doCheck = false; 59 60 enableParallelBuilding = true; 61 62 meta = { 63 description = "Parma Polyhedra Library"; 64 65 longDescription = '' 66 The Parma Polyhedra Library (PPL) provides numerical abstractions 67 especially targeted at applications in the field of analysis and 68 verification of complex systems. These abstractions include convex 69 polyhedra, defined as the intersection of a finite number of (open or 70 closed) halfspaces, each described by a linear inequality (strict or 71 non-strict) with rational coefficients; some special classes of 72 polyhedra shapes that offer interesting complexity/precision tradeoffs; 73 and grids which represent regularly spaced points that satisfy a set of 74 linear congruence relations. The library also supports finite 75 powersets and products of (any kind of) polyhedra and grids and a mixed 76 integer linear programming problem solver using an exact-arithmetic 77 version of the simplex algorithm. 78 ''; 79 80 homepage = "http://bugseng.com/products/ppl/"; 81 82 license = lib.licenses.gpl3Plus; 83 84 maintainers = [ ]; 85 platforms = lib.platforms.unix; 86 }; 87}