1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 unstableGitUpdater,
6 cmake,
7 blas,
8 gmp,
9 mpfr,
10 fplll,
11 eigen,
12 llvmPackages,
13}:
14
15stdenv.mkDerivation {
16 pname = "flatter";
17 version = "0-unstable-2025-03-28";
18
19 src = fetchFromGitHub {
20 owner = "keeganryan";
21 repo = "flatter";
22 rev = "13c4ef0f0abe7ad5db88b19a9196c00aa5cf067c";
23 hash = "sha256-k0FcIJARaXi602eqMSum+q1IaCs30Xi0hB/ZNNkXruw=";
24 };
25
26 strictDeps = true;
27
28 nativeBuildInputs = [
29 cmake
30 ];
31
32 buildInputs = [
33 blas
34 gmp
35 mpfr
36 fplll
37 eigen
38 ]
39 ++ lib.optionals stdenv.hostPlatform.isDarwin [
40 llvmPackages.openmp
41 ];
42
43 passthru.updateScript = unstableGitUpdater { };
44
45 meta = with lib; {
46 description = "(F)ast (lat)tice (r)eduction of integer lattice bases";
47 homepage = "https://github.com/keeganryan/flatter";
48 license = licenses.lgpl3Only;
49 mainProgram = "flatter";
50 platforms = platforms.all;
51 maintainers = with maintainers; [ josephsurin ];
52 };
53}