about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science/math/latte-integrale/default.nix
blob: 7eb485974ff21230d931ce3fc3ad0c6e0c9e7f98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ lib
, stdenv
, fetchurl
, fetchpatch
, gmp
, ntl
, cddlib
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "latte-integrale";
  version = "1.7.6";

  src = fetchurl {
    url = "https://github.com/latte-int/latte/releases/download/version_${lib.replaceStrings ["."] ["_"] finalAttrs.version}/latte-int-${finalAttrs.version}.tar.gz";
    sha256 = "sha256-AGwQ6+XVv9ybFZy6YmSkQyhh/nY84F/oIWJKt9P8IXA=";
  };

  patches = [
    # C++17 compat
    (fetchpatch {
      url = "https://github.com/latte-int/latte/commit/6dbf7f07d5c9e1f3afe793f782d191d4465088ae.patch";
      excludes = [ "code/latte/sqlite/IntegrationDB.h" ];
      sha256 = "sha256-i7c11y54OLuJ0m7PBnhEoAzJzxC842JU7A6TOtTz06k=";
    })
  ];

  buildInputs = [
    gmp
    ntl
    cddlib
  ];

  meta = {
    description = "Software for counting lattice points and integration over convex polytopes";
    homepage = "https://www.math.ucdavis.edu/~latte/";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [ amesgen ];
    platforms = lib.platforms.unix;
  };
})